Hello,
i have a small problem with About window.
When i click on ESC key, it quit the app without ask anything.
If i had notify=closerequest, it ask me if i want to quit app as the main window app.
If i open RAPAGUI about window, i click on ESC key, it close the window properly and keep the app open.
My question is how to close About window with ESC key without close my app.
Thanks for your help.
Close About window
Re: Close About window
In your RapaGUI event function, you probably should have something like this:
So, the main thing is to do separate actions for separate windows if needed. I guess you have just one action for all windows.
Code: Select all
Switch msg.Class
Case "Window":
Switch msg.Attribute
Case "CloseRequest":
Switch msg.ID
Case "main_window": ; The main window was closed, end the program
End ; or call your quit function
Default: ; If any other window was closed, just hide the window
moai.Set(msg.ID, "Open", False)
EndSwitch
EndSwitch
EndSwitch
Re: Close About window
Thanks a lot jPV for the example, i understand better!
I have replaced
by
about is id of the About window and it work perfectly.
I have replaced
Code: Select all
moai.Set(msg.ID, "Open", False)
Code: Select all
moai.Set("about", "Open", False)
Re: Close About window
I would keep it as msg.ID, because msg.ID will get the "about" as an value anyway. It would be more all-around code then if you happen to create another window in the program or want to re-use the code later.
Re: Close About window
Ha ok, i think there is a problem in my code so because didn't work with msd.ID...but work with "about"