hi all,
is it possible to list the gadgets children of a container gadget?
PB manual only tells us how to ADD.
Cannot LIST/VIEW?
Possible to list the gadgets children of a container gadget?
-
- Enthusiast
- Posts: 339
- Joined: Tue Jan 30, 2007 5:47 am
- Location: Hong Kong
Re: Possible to list the gadgets children of a container gad
If you add it, you know that it is there
If you need this information later, store it in a 'ContainerGadgetList()'
Bernd
If you need this information later, store it in a 'ContainerGadgetList()'
Bernd
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: Possible to list the gadgets children of a container gad
Code: Select all
EnableExplicit
Define EventID
Procedure ListWindows(hwnd,Param)
Protected String$
Protected String2$
String$ = Space(250)
String2$ = Space(1024)
GetWindowText_(hwnd,String$,250)
GetClassName_(hwnd,@String2$,Len(String2$))
Debug "Handle-Nummer des Gadgets: "+Str(hwnd)
Debug "PureBasic-Nummer des Gadgets: "+Str(GetProp_(hwnd, "PB_ID"))
Debug "Typ des Gadgets: "+String2$
Debug "Inhalt des Gadgets: "+String$
Debug "--------------------------------------------------------------------"
ProcedureReturn #True
EndProcedure
If OpenWindow(0,0,0,500,400,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
If ContainerGadget(0, 10, 10, 480, 380, #PB_Container_Flat)
ButtonGadget(1,10,10,100,20,"Hallo Button",0)
StringGadget(2,120,10,100,20,"Hallo Edit",0)
ListViewGadget(3,10,40,100,100,0)
CloseGadgetList()
EndIf
EnumChildWindows_(GadgetID(0),@ListWindows(),0)
Repeat
EventID=WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
End
EndIf
ForEver
EndIf