Second window

Just starting out? Need help? Post your questions and find answers here.
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 184
Joined: Thu Dec 28, 2023 9:04 pm

Second window

Post 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
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: Second window

Post 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
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 184
Joined: Thu Dec 28, 2023 9:04 pm

Re: Second window

Post by rndrei »

Yes! Thanks!
Post Reply