Forum Discussion
4 Replies
Sort By
- YMinaevStaffHi,
Exactly how are you using WaitWindow? - axidNew Contributor
Aliases.Dialog_ThingsViewer.WaitWindow("SysTreeView32","Tree1",1,10000)
this works only for waiting for the tree
if i want to access items in the tree i can do it like this:
Aliases.Dialog_ThingsViewer.tree_BigThings.wItems.Item(item_name_or_index)
this return Item object (Win32TreeViewItem) that has no Exists property, so i cant test whether it already exist or not
the same way wItem that returns a Collection Object (TreeViewItemCollection) of items that has no property or method to check whether it has some item or not...
tree_BigThings is the mapped name for ("SysTreeView32","Tree1",1) in Dialog_ThingsViewer
am I missing something? - YMinaevStaffHi,
If you want to check whether an item exists in the tree, you need to search for it within the tree items by iterating through them and comparing their captions with the needed one. The tree items do not have the Exists property since they're internal objects of a control, and they're not shown in the object tree. - axidNew ContributorYep, i thought about searching. However it may be very slow sometimes and require extra loop. I hoped that there were some more compact ways to do that.
Maybe there is a way to convert TreeViewItemCollection into string and then use some string lookup method. I'm not sure if it is a faster way though.
Related Content
- 4 years agovibin
- 13 years agomrouse
- 2 years agomichelleunique
Recent Discussions
- 48 minutes agoashly