Code: Select all
If OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
TreeGadget(0, 10, 10, 160, 160,#PB_Tree_AlwaysShowSelection)
For a = 0 To 10
AddGadgetItem (0, -1, "Normal Item "+Str(a), 0, 0)
Next
SetActiveGadget(0)
SetGadgetState(0,4)
Debug GetGadgetText(0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf