Sign in to follow this  
Followers 0
Sathya

How to get children using tree view

4 posts in this topic

How to get children using tree view. For e.g, i have a tree "parent" in which there are four children "Child1", "Child2", "Child3", "Child4". i need to get the names of all the children under "parent". I tried using _guiCtrltreeview_getfirstchild and _guiCtrltreeview_getnextchild. how to get the names???

Thanks, sathya

Share this post


Link to post
Share on other sites



After getting the handle of the children using _guiCtrltreeview_getfirstchild and _guiCtrltreeview_getnextchild use Function _GUICtrlTreeView_GetText to get the text of the item:

$hItem = _guiCtrltreeview_getnextchild($hWnd)
$sItemtext = _GUICtrlTreeView_GetText($hItem)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

After getting the handle of the children using _guiCtrltreeview_getfirstchild and _guiCtrltreeview_getnextchild use Function _GUICtrlTreeView_GetText to get the text of the item:

$hItem = _guiCtrltreeview_getnextchild($hWnd)
$sItemtext = _GUICtrlTreeView_GetText($hItem)

i used the same what you told but i'm getting only "child 1" and "child 2". i also need text of "child 3" and "child 4"

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You have to retrieve the childs in a loop until

_GUICtrlTreeView_GetNextChild($hWnd) = 0

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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