LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically start rename of tree item

Solved!
Go to solution

Hi all,

 

I want to replicate the behavior seen in many tree controls/list boxes. For example in the LabVIEW project you can right-click on an object and select "rename" or press F2 and the text of the item will be highlighted ready for the user to type a new entry.

 

I can populate the shortcut menu etc. but I can not find how to programmatically initiate the edit operation, any ideas? Simulating a mouse down event with a DLL call seems a bit hacky.

 

Thanks,

Steve.

0 Kudos
Message 1 of 4
(2,421 Views)
Solution
Accepted by topic author St3ve

Hi St3ve,

 

You should be able to achieve this with the tree EditPos Property - as mentioned in the help be sure to set keyfocus first. 

 

Regards,

Tom L.
Message 2 of 4
(2,413 Views)

Tom,

 

Thanks for that, I had tried that but missed the bit about key focus! RTFM!

 

Many thanks,

Steve.

0 Kudos
Message 3 of 4
(2,406 Views)

No problem- that one's definitely easy to miss. Robot Very Happy

Tom L.
0 Kudos
Message 4 of 4
(2,402 Views)