wxtreelistctrl right click select+dropdown menu

Hi everyone,
This question is similar to Frank's listctrl question, but is
different enough that I thought I should make my own thread.

I have a treelistctrl where I'm trying to select an element on the
list with right-click, while simultaneously activating a drop down
menu. The drop down part isn't a problem, and I already have my right
click successfully triggering my event handler when I click on an
already selected item. However, is there any way to have right click
actually select the item in the tree? (It'd be nice if the user could
just hover over the element and hit right click to bring up a menu).
Left click however, should only select the item(which it currently
does).

Thanks,
Varun

You can use HitTest to find out the item that is under the mouse position and then use the tree's methods to select the item or do whatever else you may need.

···

On 6/28/11 7:20 AM, Varun wrote:

Hi everyone,
This question is similar to Frank's listctrl question, but is
different enough that I thought I should make my own thread.

I have a treelistctrl where I'm trying to select an element on the
list with right-click, while simultaneously activating a drop down
menu. The drop down part isn't a problem, and I already have my right
click successfully triggering my event handler when I click on an
already selected item. However, is there any way to have right click
actually select the item in the tree? (It'd be nice if the user could
just hover over the element and hit right click to bring up a menu).
Left click however, should only select the item(which it currently
does).

--
Robin Dunn
Software Craftsman