11-04-2013 04:52 PM
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.
Solved! Go to Solution.
11-04-2013 05:07 PM
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,
11-04-2013 05:20 PM
Tom,
Thanks for that, I had tried that but missed the bit about key focus! RTFM!
Many thanks,
Steve.
11-04-2013 05:28 PM
No problem- that one's definitely easy to miss.