[fxruby-users] GUI Message Box

Jeroen van der Zijp jeroen at fox-toolkit.org
Wed Jul 29 10:37:29 EDT 2009

On Wednesday 29 July 2009, Stuart Clarke wrote:
> Hi all,
> I hope this is not to silly a question. I have a GUI which simpily allows the user to point to a few files and folders then click a Run button. Upon completion of the backend processing the user is then presented with a FXMessageBox giving an information message and the user can click on OK. By clicking Ok the original GUI is still sitting in the background and has to be terminated by the user also. I was wondering is there a way that when the FXMessageBox pops up and the user clicks Ok, can it kill the popup GUI and the original GUI in the same way FXApp::ID_QUIT works FXMenuCommand.
> I hope this makes sense

When the FXMessageBox returns from execute() with MBOX_OK, you're code should just close()
the main window, or sent the main window an ID_CLOSE message, which has the same effect.

If you don't want to terminate, then you can hide() the main window, because if you close() 
a FXTopWindow, FXApp is sent an ID_QUIT if no other top windows remain.

So if you didn't actually want to stop the program then its best to simply hide() the window.


			- Jeroen

More information about the fxruby-users mailing list