Associating data to a menu

Vadim Zeitlin vadim at wxwindows.org
Tue Feb 13 05:45:38 PST 2007


On Tue, 13 Feb 2007 09:51:23 +0530 Lloyd <lloyd at cdactvm.in> wrote:

L> Thanks VZ, could you please make it more clear. My actual requirement is
L> to get this data in the event handler of the pop-up-menu click event,

 If you use a custom wxMenu subclass, you can put all the data you need
into it. And you can access even object from the event handler using
event.GetEventObject().

 But now I realize that you probably speak about menu _items_ when you say
"menu". In this case my advice doesn't apply and you will have to use
different ids to be able to distinguish between the items.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list