Sign in to follow this  
Followers 0
StungStang

Select TreeView Item

7 posts in this topic

Hi to all, for exsample i've this code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiTreeView.au3>

$Form2 = GUICreate("Test", 496, 299, 219, 217)
$Label1 = GUICtrlCreateLabel("Test", 8, 8, 42, 17)
$t_tree = GUICtrlCreateTreeView(16, 48, 465, 201, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_CHECKBOXES, $TVS_FULLROWSELECT, $WS_HSCROLL, $WS_VSCROLL), $WS_EX_CLIENTEDGE)
$t_1 = GUICtrlCreateTreeViewItem("Parent", $t_tree )
$t_2 = GUICtrlCreateTreeViewItem("Parent", $t_tree )
$t_3 = GUICtrlCreateTreeViewItem("Parent", $t_tree )
GUICtrlCreateTreeViewItem("Children", $t_1)
GUICtrlCreateTreeViewItem("Children 2", $t_1)
GUICtrlCreateTreeViewItem("Children 3", $t_1)
GUICtrlCreateTreeViewItem("Children", $t_2)
GUICtrlCreateTreeViewItem("Children 2", $t_2)
GUICtrlCreateTreeViewItem("Children 3", $t_2)
GUICtrlCreateTreeViewItem("Children", $t_3)
GUICtrlCreateTreeViewItem("Children 2", $t_3)
GUICtrlCreateTreeViewItem("Children 3", $t_3)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
EndSwitch
WEnd

Now i want that when i check a "Parent" item, all it's Childre must be selected. How i can do that?

Hi and thanks for the help

Share this post


Link to post
Share on other sites



Search this forum. I have seen exactly this one solved here some time ago.

Thanks for the suggestion, but unluckely i can't find nothing (it can be the late hour:P). I see only very old discussion but noone with my same question. I'm still searching, but if anyone have a suggestion i will accept it :oops:

Hi!

Share this post


Link to post
Share on other sites

Sorry for the late answering ;), but the problem is still here.

@zedna

Your link do the exact opposite of that i want do. I want check/uncheck all children of a selected/unchecked parent.

Hi!

Share this post


Link to post
Share on other sites

Sorry but i can't figure out a soluction. Can you give me some info?.

I'm searching a lot on the forum but i can't find a topic with my same question that have a real soluction.

Hi!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0