Hi Andreas, > 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.
I'm using wxEVT_COMMAND_TREE_ITEM_MENU; I think there is also TREE_ITEM_RIGHT_CLICK, but the first one works well for me (I'm using it to generate a context menu). Or did I misunderstand what you are trying to do? Paul. On Sat, Nov 23, 2013 at 1:31 PM, Andreas Falkenhahn <andr...@falkenhahn.com> wrote: > Hi, > > 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. > > Is it possible to do this in wxLua as well? I tried the following but > it didn't work: > > local ctrl = wx.wxTextCtrl(...) > ctrl.OnRightClick = function(event) print("test") end > > -- > Best regards, > Andreas Falkenhahn mailto:andr...@falkenhahn.com > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > wxlua-users mailing list > wxlua-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wxlua-users ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users