[wx 2.6.x, arm/x86,
gnu] Creating my own wxKeyEvents and Accelerator events
Vadim Zeitlin
vadim at wxwindows.org
Tue Apr 3 19:11:38 PDT 2007
On Tue, 3 Apr 2007 09:07:53 -0400 Richard Harvey Chapman <hchapman-wx-users at 3gfp.com> wrote:
RHC> wxPostEvent did work, thank you. I modified my code to tell the
RHC> difference (Accel events have no object, wxPostEvents must). I didn't
RHC> realize until last night that the accel events are generated by wx.
I don't understand this -- all wxEvents are generated by wx. Who else can
generate them? But the underlying system events are usually not generated
by wx and in the case of accelerators under Win32, for example, they are
not.
RHC> How do I generate a Key Down/Char/Up event?
The best is to simply look at how wx code does it.
RHC> This may solve another problem of mine, there is no way via code to
RHC> activate a combo box's drop down list.
Indeed. I don't know if it's a good idea to do it, IMO it would be quite
surprising to the user. But maybe it's justified in some particular cases.
In any case, I don't really know how to do it on the platforms other than
Win32.
RHC> Is there a uniform way to get the underlying GTK+ widget for any wx
RHC> widget?
You have m_widget (return by GetHandle(), this is what you need for native
function normally) and m_wxwindow. See the comment in src/gtk/window.cpp
about them for more information.
Good luck,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list