Jump to content
Sign in to follow this  
alexhaag

How can I select multiple Elements in treeview having different paths?

Recommended Posts

alexhaag

Hi there,

I've got a treeview as shown below. I'd like to select the Elements Element1 and Element4 as a multiselect.

root1

---folder11

------folder111

---------Element1

....

root2

---folder21

------Element4

....

I managed to select Element1, but when I use ControlTreeView(..."Select", $pathToElement4) the result is that Element4 is selected, but Element1 is not.

I also tried to Send {CTRLDOWN} before using ControlTreeView(..."Select", $pathToElement4), but i got the same effect.

Could anyone please help me with this?

Hints, examples, etc. Everything is welcome...

Greets Alex

Share this post


Link to post
Share on other sites
PsaltyDS

Hi there,

I've got a treeview as shown below. I'd like to select the Elements Element1 and Element4 as a multiselect.

root1

---folder11

------folder111

---------Element1

....

root2

---folder21

------Element4

....

I managed to select Element1, but when I use ControlTreeView(..."Select", $pathToElement4) the result is that Element4 is selected, but Element1 is not.

I also tried to Send {CTRLDOWN} before using ControlTreeView(..."Select", $pathToElement4), but i got the same effect.

Could anyone please help me with this?

Hints, examples, etc. Everything is welcome...

Greets Alex

Use the _GuiCtrlTreeView_* UDF functions (see help file). Especially _GUICtrlTreeView_SetSelected().

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
alexhaag

Use the _GuiCtrlTreeView_* UDF functions (see help file). Especially _GUICtrlTreeView_SetSelected().

:D

Hi PsaltyDS and others,

sorry, but I think I didn't make myself clear enough. I'll try again:

I don't use the AutoIt-Gui at all!!! So I don't think that I can use the _GuiCtrlTreeView_ functions. If I'm wrong please correct me!!;-)

I've got an Eclipse RPC with a navigation-treeview and I like to use my AutoIt-Script make a multiSelect on this navigation-tree as mentioned in my earlier post.

After the selction is done the script does some menuactivation in the RCP in order to start a file-export.

Any solutions on this?

Greets Alex

Share this post


Link to post
Share on other sites
PsaltyDS

Hi PsaltyDS and others,

sorry, but I think I didn't make myself clear enough. I'll try again:

I don't use the AutoIt-Gui at all!!! So I don't think that I can use the _GuiCtrlTreeView_ functions. If I'm wrong please correct me!!;-)

I've got an Eclipse RPC with a navigation-treeview and I like to use my AutoIt-Script make a multiSelect on this navigation-tree as mentioned in my earlier post.

After the selction is done the script does some menuactivation in the RCP in order to start a file-export.

Any solutions on this?

Greets Alex

You are wrong about the AutoIt GUI.

The GuiTreeView.au3 UDF is primarily intended for use with third-part GUIs. Use ControlGetHandle() to get the handle to the parent treeview control, then use the _GuiTreeView_* functions to find the handles to the items you want (with things like _GUICtrlTreeView_FindItem()). Then use the item handles to set the selected state on those items with _GUICtrlTreeView_SetSelected().

What does AU3Info.exe show about your treeview control?

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
alexhaag

You are wrong about the AutoIt GUI.

The GuiTreeView.au3 UDF is primarily intended for use with third-part GUIs. Use ControlGetHandle() to get the handle to the parent treeview control, then use the _GuiTreeView_* functions to find the handles to the items you want (with things like _GUICtrlTreeView_FindItem()). Then use the item handles to set the selected state on those items with _GUICtrlTreeView_SetSelected().

What does AU3Info.exe show about your treeview control?

:D

Thanks again PsaltyDS,

I managed my multiSelection now. I just didn't know that the GuiTreeView.au3 is intended to use that way.

Greets Alex

Edited by alexhaag

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.