Beispiel:
Code: Alles auswählen
Enumeration
#Window_0
#Window_1
EndEnumeration
Procedure Open_Window_0()
If OpenWindow(#Window_0, 269, 233, 600, 300, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window ( 0 )")
If CreateGadgetList(WindowID())
ButtonGadget(0,10,10,50,50,"Button 0")
EndIf
EndIf
EndProcedure
Procedure Open_Window_1()
If OpenWindow(#Window_1, 271, 487, 600, 300, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window ( 1 )")
If CreateGadgetList(WindowID())
EndIf
EndIf
EndProcedure
;Fenster 1 öffnen
Open_Window_0()
;Fenster 2 öffnen
Open_Window_1()
;Um den Button in Fenster 1 zu erstellen nochmal CreateGadgetlist() ?
CreateGadgetList(WindowID(#Window_0))
ButtonGadget(1,60,10,50,50,"Button 1")
Repeat : Until WaitWindowEvent() = #PB_EventCloseWindow