GetItem in wxTreeEvent broken
Vadim Zeitlin
vadim at wxwindows.org
Wed Jan 24 09:14:02 PST 2007
On 24 Jan 2007 09:08:54 -0800 Marco De Paoli <depaolim at gmail.com> wrote:
MDP> I'm using GetSelection of wxTreeCtrl in EVT_MENU handler for a
MDP> wxTreeCtrl context menu
MDP> but it is always returns the last item selected by a left click, not
MDP> the right-clicked one
Yes, this is because only left clicks change selection -- right ones
don't.
MDP> can you help me?
Use event.GetItem() to get the item for which the menu should be
displayed.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list