I can show them but can not figure out how to remove them.
I appreciate any input.
Thank you
Code: Select all
LB:="myTree1"
Gui, Add, TreeView, AltSubmit v%LB% h100
P1 := TV_Add("First parent",,"expand")
P1C1 := TV_Add("Parent 1's first child", P1) ; Specify P1 to be this item's parent.
P2 := TV_Add("Second parent",,"expand")
P2C1 := TV_Add("Parent 2's first child", P2)
P2C2 := TV_Add("Parent 2's second child", P2,"expand")
P2C2C1 := TV_Add("Child 2's first child", P2C2)
Gui, Add, Button, y+5 w120 h20 gCH, Make Checked
Gui, Add, Button, x+10 w120 h20 guCH, Remove Checkboxes
Gui, Show ; Show the window and its TreeView.
return
CH:
;~ GuiControl, -Redraw, %LB%
GuiControl, +0x100, %LB%
;~ GuiControl, +Checked, %LB%
;~ GuiControl, +Redraw, %LB%
return
uCH:
;~ GuiControl, -Redraw, %LB%
GuiControl, -0x100, %LB%
;~ GuiControl, -Checked, %LB%
;~ GuiControl, +Redraw, %LB%
return
Esc::
GuiClose:
ExitApp