Page 1 of 1

Newbie question

Posted: Tue Jan 26, 2021 1:21 am
by kpeters58
Just running the Gadget.sb demo code from the Gadgets help

The code led me to believe that pressing the QUIT button would hide the window - but nothing at all happens...

Am I missing something? Bug?

Re: Newbie question

Posted: Tue Jan 26, 2021 2:28 am
by Paul
That's because someone used
#PB_Window_TitleBar
instead of
#PB_Window_SystemMenu
with the OpenWindow command.

The other option would be to change
BindEvent(#PB_Event_CloseWindow, @CloseWindowEvent())
to
BindEvent(#PB_Event_Gadget, @CloseWindowEvent(),0,8)
so it uses the "Quit" button instead.


Yeah it's a bug cause it's not doing what the end user expects it to do ;)

Re: Newbie question

Posted: Tue Jan 26, 2021 5:02 pm
by kpeters58
Thanks for the detailed explanation, Paul!