Subwindow (MaxGUI)
BlitzMax Forums/BlitzMax Beginners Area/Subwindow (MaxGUI)| 
 | ||
| Hmm, I can't seem to figure how to go about this one. I want to make an "About" window for my app but when I close the about window the original window closes too !! I'd like it to work like NOTIFY, graying out the original window as long as the about-window is open and then jump right back to the original window and continue like nothing at all happened when the sub-window is closed... | 
| 
 | ||
| If the about is shown, disable your main window. if the about is closed, just freegadget the about window and enable the main window again. I would assume that your event handling so far only looks for event_windowclose but not for the sender and thus closes the main window instead of the about window. | 
| 
 | ||
| It looks for event_closewindow, yes, but both windows close on ABOUT exit ?? | 
| 
 | ||
| You'll need to check for event source like so 
SuperStrict
Local MyWindow:TGadget=CreateWindow("Main Window", 200,200,320,240)
Local AboutWindow:TGadget=CreateWindow("About Window",250,250,200,100,MyWindow)
Repeat
  WaitEvent()
  Select EventID()
  Case EVENT_WINDOWCLOSE
	Select EventSource()
	Case AboutWindow
		FreeGadget AboutWindow
	Case Mywindow
		End
	End Select
   End Select
Forever
 | 
| 
 | ||
| AHA !, thanks assari ;o) BTW: Your MaxGUI tuts are great :oD |