Found an issue in SpiderBasic ? Please report it here !
User avatar
Peter
 
Posts: 586
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

TreeGadget: Expanded-Flag is lost after AddGadgetItem()

by Peter Tue May 09, 2017 11:37 am

Hello,

the #PB_Tree_Expanded - Flag is lost after AddGadgetItem():

PureBasic:
Image

SpiderBasic:
Image

SampleCode:
Code: Select all
EnableExplicit

OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

TreeGadget(0, 10, 10, 160, 160)

AddGadgetItem (0, -1, "Node", 0, 0)
AddGadgetItem(0, -1, "Sub-Item 1", 0, 1)      
AddGadgetItem(0, -1, "Sub-Item 2", 0, 1)
AddGadgetItem(0, -1, "Sub-Item 3", 0, 1)

SetGadgetItemState(0, 0, #PB_Tree_Expanded)

AddGadgetItem(0, -1, "Sub-Item 4", 0, 1)

CompilerIf #PB_Compiler_OS <> #PB_OS_Web
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
CompilerEndIf


Thanks in advance & Greetings ... Peter
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 1 guest