Le 12/11/2013 00:19, Bruce a écrit : > On Mon, 2013-11-11 at 22:30 +0100, Benoît Minisini wrote: >> Le 11/11/2013 21:47, Bruce a écrit : >>> Is there some way to make a popup form only close on a specific user >>> action? >>> >>> In the attached picture, I have a popup form displaying some statistical >>> guff about the data displayed in the main form. (I have pixelised the >>> main form just to highlight the popup.) >>> >>> As per design, as soon as the user clicks on the main form, the popup >>> disappears. In fact, as soon as the user clicks (anything) the popup >>> disappears. >>> >>> What I would like to have happen is that the popup remain active until >>> the user performs a specific action e.g. presses Alt+F, or whatever. >>> >>> (I have tried both the Show and ShowModal approaches, but they have >>> other problems with things like positioning the popup correctly, >>> multiple copies etc etc. ShowPopup seems to give the best operation so >>> far.) >>> >>> Even getting to the point of only closing the popup if the click is >>> within the main form window would help. >>> >>> Any ideas? >>> >>> tia >>> Bruce >>> >> >> Look at the Window.Utility property. >> >> Regards, >> > > Wonderful! Almost there. The only problem I have left (ha-ha!) is > moving the main form to another virtual desktop. In LXDE I can drag the > main form to the next or prior desktop (or use the window menu "Send to > Desktop"), I presume that there are equivalent features on other > desktops, I've just forgotten. > > When I do this with the "utility" window open it moves the main form > correctly but leaves the utility on the original desktop. > > This may be an LXDE or OpenBox issue, but I thought maybe someone has > got an idea. > > tia >
This may be a window manager issue: on KDE, if you move the main window on another virtual desktop, the utility window follows. Check which gui component you actually use: gb.qt4 or gb.gtk. If you use gb.gui, define the GB_GUI environment variable to "gb.qt4" or "gb.gtk". The problem may come from that (i.e. the toolkit may not give enough information to the window manager to let him decide what to do with the utility window). On X11, the window manager job is... managing windows. The application must not deal with that. So if the window manager is not very clever, you have problems like that! -- Benoît Minisini ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user