I consider this a bug either in behaviour or in documentation.
Code: Select all
define Win, i
Win = OpenWindow(#PB_Any, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
if Win
StringGadget(1, 10, 0, 160, 24, "Test")
TreeGadget(0, 10, 32, 160, 160)
for i = 0 to 10
AddGadgetItem (0, -1, "Item " + Str(i), 0, 0)
next
SetActiveGadget(0); comment this means selection does not work
SetGadgetItemState(0, 3, #PB_Tree_Selected)
SetActiveGadget(1); comment this keeps selection of tree item
repeat : until WaitWindowEvent() = #PB_Event_CloseWindow
endif
When I put focus back into StringGadget after getting that setGadgetItemState did only work after SetActiveGadget(#Tree), I noticed selection was also gone...
Any tricks to solve this?
Unfort. RSBasic.de has nothing in this direction.
Any link to the problem?
Thanks a lot in advance!
Regards!