From: The D. <the...@bl...> - 2005-06-25 21:07:32
|
John Labenski <jla...@gm...> wrote: (25/06/2005 21:22) > >> Another thing I haven't found a way to do is make a popup menu that appears if a button is clicked. I tried till I got confused, and all I can say is that nothing worked, and the variety of error reports was dazzling. :) > >local popMenu = wx.wxMenu() >-- add normal menu items >-- to position the menu for a button use local rect = >mybutton.GetRect() to find the bottom left. >mywindow.PopupMenuXY(popMenu, mouseEvt.GetX(), mouseEvt.GetY()) > >Regards, > John Labenski > Thankyou. I can't make that work though, even when it's spelled out like that. The mouseEvt's are nil values, so I substitute actual numbers, and that won't work either. If I take the PopupMenu instead of PopupMenuXY, and use a wxPoint instead of the two integers (as specified in the wxWidgets manual), that doesn't work either. I need something tested and verified. The problem I have is that if something works I can thrash around on my own trying to vary things to see what works, what breaks, and maybe even what will work better. If I can't get anything to work, all I can do is plead from a state of utter helplessness. Any actual working script, complete, no matter how small, is great, I can then take it apart til I know how it ticks. |