On Mon, Oct 19, 2009 at 4:40 AM, Michael Gerbracht <smartma...@arcor.de> wrote:
> I am new to wxLua and would like to know how to add a context menu to a
> winodw (I know how to create a menu bar).
> The window is a TreeCtrl pane of a AUI frame if this makes anydifference.
>

You want to create a wxMenu and call wxWindow::PopupMenu() in your
event function connected to a wxWindow using the wxEVT_LEFT_UP event
type and you will get a wxMouseEvent.

http://docs.wxwidgets.org/stable/wx_wxmenu.html#wxmenu
http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindowpopupmenu
http://docs.wxwidgets.org/stable/wx_wxmouseevent.html#wxmouseevent

See the scribble sample for connecting mouse events to windows.

Hope this helps,
     John

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to