Ranorex

TreeViewSelectItem question

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython
View previous topic :: View next topic  
Author Message
jasong



Joined: 26 Oct 2007
Posts: 49
Location: Texas

PostPosted: Thu Nov 29, 2007 8:11 pm    Post subject: TreeViewSelectItem question
I used the following:
Code: click into code to enlarge

TreeViewSelectPath(control, 'level1/level2')
parent = TreeViewGetSelectedItem(control)
child = TreeViewGetChildItem(control, parent)
TreeViewSelectItem(control, child)

what I get is an 'argument error' for TreeViewSelectItem.

I have verified with TreeViewGetItemText that the child item handle is correct.
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 298

PostPosted: Fri Nov 30, 2007 5:43 pm    Post subject:
Sorry, this is a bug in the Python documentation, the second argument of the function should be the text of the item and not the handle.
See also the sample TreeViewTest in the Ranorex Scripts directory.

Please use the following code:

Code: click into code to enlarge
TreeViewSelectPath(control, 'level1/level2')
parent = TreeViewGetSelectedItem(control)
child = TreeViewGetChildItem(control, parent)
childText = TreeViewGetItemText(treeView,child)
TreeViewSelectItem(control, childText)     


We have corrected the documentation for the next release.

Jenö
Ranorex Support Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum