Closing a window
BlitzMax Forums/MaxGUI Module/Closing a window
| ||
This must be simple but i can't figure it out. I am working with skinned windows with some code provided by Yan at http://www.blitzbasic.com/Community/posts.php?topic=62753 The problem is I don't know how to close only the child tool window of a parent tool window. |
| ||
The FreeGadget command should close the specified window. |
| ||
Not sure want you mean as the link does not work. But may this helps: Local test:TGadget = CreateWindow:TGadget("test",278,97,472,316,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_MENU |WINDOW_STATUS ) Local ChildWindow1:TGadget = CreateWindow:TGadget("ChildWindow1",141,22,284,230,test:TGadget,WINDOW_TITLEBAR|WINDOW_TOOL |WINDOW_CHILD) Local Button1:TGadget = CreateButton:TGadget("Show Window",34,112,82,33,test:TGadget,BUTTON_PUSH) Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE Select EventSource() Case test test_WC( test:TGadget ) Case ChildWindow1 ChildWindow1_WC( ChildWindow1:TGadget ) End Select Case EVENT_GADGETACTION Select EventSource() Case Button1 Button1_GA ( ChildWindow1:TGadget ) End Select End Select Forever Function test_WC ( Window:TGadget ) End End Function Function ChildWindow1_WC ( Window:TGadget ) HideGadget( Window:TGadget ) End Function Function Button1_GA ( Window:TGadget ) ShowGadget( Window:TGadget ) End Function You could also replace the HideGadget with FreeGadget if don't use the window again. does it help? jsp |
| ||
I was doing that but my skinned window just hung around. The link works from here. The article is called "wnat none rectangular windows/gadgets" in the Blitz Programming forum. |
| ||
The Link worked today, yesterday i got always "Internal Error" whatever it means... Didn't know this skinned window thing, very nice! Anyway, when changing the code it works fine for me to free the window?! May be better to post some code that we can have a look. jsp |