;Autor: edel ;http://www.purebasic.fr/german/viewtopic.php?p=313479#p313479 EnableExplicit Define EventID If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If PanelGadget (0, 8, 8, 306, 203) AddGadgetItem (0, -1, "Panel 1") If PanelGadget (1, 5, 5, 290, 166) AddGadgetItem(1, -1, "Sub-Panel 1") AddGadgetItem(1, -1, "Sub-Panel 2") AddGadgetItem(1, -1, "Sub-Panel 3") CloseGadgetList() EndIf AddGadgetItem (0, -1,"Panel 2") ButtonGadget(2, 10, 15, 80, 24,"Button 1") ButtonGadget(3, 95, 15, 80, 24,"Button 2") CloseGadgetList() EndIf Debug WindowID(0) Debug GetAncestor_(GadgetID(3), #GA_ROOT) Repeat EventID = WaitWindowEvent() If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf ; IDE Options = PureBasic 5.31 (Windows - x64) ; CursorPosition = 2 ; EnableUnicode ; EnableXP ; EnableUser ; EnableCompileCount = 0 ; EnableBuildCount = 0