Page 1 of 1

Second window

Posted: Sat Sep 21, 2024 8:41 am
by rndrei
How to open the second window so that the first window does not close when you click the cross of the second window?

Code: Select all

OpenWindow(0, 200, 100, 300, 300, "Window 1")
OpenWindow(1, 300, 300, 200, 200, "Window 2")
EditorGadget(0, 0, 0, 200, 100)
Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      End
  EndSelect
ForEver

Re: Second window

Posted: Sat Sep 21, 2024 8:47 am
by BarryG
Do you mean like this?

Code: Select all

OpenWindow(0, 200, 100, 300, 300, "Window 1")
OpenWindow(1, 300, 300, 200, 200, "Window 2")
EditorGadget(0, 0, 0, 200, 100)
Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Select EventWindow()
        Case 0 : End
        Case 1 : CloseWindow(1)
      EndSelect
  EndSelect
ForEver

Re: Second window

Posted: Sat Sep 21, 2024 8:50 am
by rndrei
Yes! Thanks!