help window
BlitzPlus Forums/BlitzPlus Programming/help window
| ||
| How can I handle someone closing a help window? I cant seem to find a way to get around the following: IF a help window is open, and the user clicks close (or the x) then the whole program ends. The main application window should exit if someone hits the x, but not the help window. Does anyone have any samples showing how to handle two windows being open with the ability to close one without closing the other? Thanks |
| ||
Try this:mainwin=CreateWindow("main",200,200,400,300,0,3)
helpwin=CreateWindow("help",150,80,100,80,0,3)
ActivateGadget mainwin
quit=False
Repeat
ev=WaitEvent()
Select ev
Case $803
If EventSource()=mainwin
If helpwin<>0 FreeGadget helpwin
FreeGadget mainwin
quit=True
EndIf
If EventSource()=helpwin
FreeGadget helpwin : helpwin=0
EndIf
End Select
Until quit=True
End |
| ||
| Hey Syntax, Thanks as always! /bonk myself |