Tim Burgess
2014-07-16 09:22:38 UTC
Hi,
My port of a QT application to WX continues - I've successfully got a
wxGridSizer laying out my 100 buttons - I now have to provide a context
menufor each button (I agree that this is a nonsense, but I'm still trying
to keep as close to the original application as I can). I've coded the
context menu so that it successfully brings up the options that I want, but
I'm confused as to how I can reliably grab the ID of the button that had
focus before the menu appeared so that I can pass it along for further
processing, since the button doesn't support a right-click event and I'm
having to use EVT_CONTEXT_MENU. Querying the context menu event will return
the ID of the chosen menu option, obviously, and so will a call based on
getting the focus - I'm a bit stuck, so can anybody offer any suggestions,
please?
Best wishes.
Tim Burgess
My port of a QT application to WX continues - I've successfully got a
wxGridSizer laying out my 100 buttons - I now have to provide a context
menufor each button (I agree that this is a nonsense, but I'm still trying
to keep as close to the original application as I can). I've coded the
context menu so that it successfully brings up the options that I want, but
I'm confused as to how I can reliably grab the ID of the button that had
focus before the menu appeared so that I can pass it along for further
processing, since the button doesn't support a right-click event and I'm
having to use EVT_CONTEXT_MENU. Querying the context menu event will return
the ID of the chosen menu option, obviously, and so will a call based on
getting the focus - I'm a bit stuck, so can anybody offer any suggestions,
please?
Best wishes.
Tim Burgess
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users