From: John L. <jla...@gm...> - 2013-11-25 04:17:47
|
On Sun, Nov 24, 2013 at 5:13 AM, Andreas Falkenhahn <an...@fa...>wrote: > Hi John, > > > >> I'm trying to port some C++ code to wxLua that derives a new class from > >> wxTextCtrl and then overrides the OnRightClick() method of this class > >> to do some custom stuff when the user presses RMB over the widget. > > Catch EVT_RIGHT_UP and call event.Skip() for normal processing. > > Calling virtual functions like this is discouraged and may not > > continue to work in the future for all platforms. > > Tried it like this but it doesn't work: > > frame:Connect(100, wx.wxEVT_RIGHT_UP, function(e) print("hello") end) > > > What is supposed to happen? wxWidgets 2.8 and 3.0 don't seem to have a OnRightClick() function at all. http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/include/wx/textctrl.h?view=markup http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/include/wx/msw/textctrl.h?view=markup ... http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/include/wx/textctrl.h?view=markup http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/include/wx/msw/textctrl.h?view=markup ... Regards, John |