Sign in to follow this  
Followers 0
redndahead

Treeview Issue

4 posts in this topic

I need to get the text of what is selected in a tree view. How would I do that? I tried GuiRead($Handle) and it didn't work out.

red

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

@redndahead: for what do you need the text of the treeview?, cause you know the text cause you set it.

GUIGetMsg() will return the ControlID of the treeviewitem and GUIRead($item) the status:

GUI_Checked

GUI_Uncechked

or

GUI_Focus

Edit: ahhh, you mean treeview :ph34r: I will send the implementation to Jon, but I think the controlid would be better!?

Update @redndahead: thanks for asking :(

...
$maintree = GUICtrlCreateTreeview(10,10,150,100)
$item = GUICtrlCreateTreeviewItem("Options",$maintree)
...
While 1
   $msg = GUIGetMsg()
   If GUIRead($maintree) = $item Then...

...
WEnd
...
Edited by Holger

Share this post


Link to post
Share on other sites

Well unfortunately I don't know what I set the text to. The tree was created automatically via a script. I currently array all the return values from guiCtrlCreate so I guess at the same time I can array all the text values. It would just be a heck of alot easier to just be able to read the selected item. Truthfully what I would like best is to be able to read the whole tree in one line. =)

red

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