Jump to content

Recommended Posts

Posted

I have an application with tree view. Description is following of treeview

root

chield1

chield1.1

chield1.2

........

chield2

chield2.1

chield2.2

........

so on 

 

when i click on root the tree expands and shows only chield1, chield2(not showing 3rd level) and when i click on chield1 it shows plus mark(+) before chield1 and also shows  chield1.1, chield1.2.For this i have written following code

$idTreeView = ControlGetHandle("retrival window","","[CLASSNN:WindowsForms10.SysTreeView32.app.0.141b42a_r16_ad11]")

$hItemFound = _GUICtrlTreeView_FindItemEx($idTreeView, "root|chield1")
_GUICtrlTreeView_ClickItem($idTreeView, $hItemFound, "left", False)
$hItemm = _GUICtrlTreeView_FindItemEx($idTreeView, "root|chield1|chield1.2")     ; Till here there no problem
_GUICtrlTreeView_ClickItem($idTreeView, $hItemm, "left", False,1) 

 

Now problem is in last line it not selecting the node (chield1.1). It opens enternet explorer i do not know why"?

I have checked ($hItemm) the handle is of right node(root|chield1|chield1.2)

 

Please help

 

 

 

Posted

There's not a whole lot to go by in your description, so I'm going to make some assumptions.  Does clicking the item manually trigger IE? I see nothing in your post that would indicate any tie in to IE which is why I ask.  

Instead of using the _ClickItem function which triggers a "click" notification/message on the TreeView control, try using _GUICtrlTreeView_SelectItemByIndex() instead.

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
×
×
  • Create New...