Sign in to follow this  
Followers 0
PcExpert

Select treeview item on listbox event

3 posts in this topic

Hi all,

How to select a specific item when a listbox item is clicked? I already made the event with a simple MSGBox that works, but ofcourse I need the event to select the right item of the treeview. I already looked at the _GUICtrlTReeview_setstate() and _GUICtrlTReeview_setselected(). But those functions didnt work for me because the items are loaded from an ini-file, so I dont know the ID's. Could somebody show me how I could archieve this?

Thanks!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$tree = ControlGetHandle(...)
$node = _GUICtrlTreeView_FindItem($tree, 'text of tree item', True); substring
_GUICtrlTreeView_SelectItem($tree, $node)

Edited by Zedna

Share this post


Link to post
Share on other sites

Thanks Zedna, works like a charm!

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