Re: [wxpython-users] Newbie question re:wxMenuBar events
by Christopher Barker other posts by this author
May 7 2008 11:57AM messages near this date
Re: [wxpython-users] Newbie question re:wxMenuBar events
|
[wxpython-users] how to update progress dialog from C routine
Gre7g Luterman wrote:
> if I were writing this code by hand, each item would look
> more like:
>
> ID_BUY = wx.NewId()
> wxglade_tmp_menu.Append(ID_BUY, "Buy CW", "", wx.ITEM_NORMAL)
> self.Bind(wx.EVT_MENU, self.buy_license, id=ID_BUY)
I'd do:
item = wxglade_tmp_menu.Append(wx.ID_ANY, "Buy CW", "", wx.ITEM_NORMAL)
self.Bind(wx.EVT_MENU, self.buy_license, item)
see:
http://wiki.wxpython.org/wxPython%20Style%20Guide
I really don't like IDs. I do wish you could just do:
Menu_Item.Bind(...)
But such is life.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@[...].gov
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Randy Rue
Chester
Gre7g Luterman
Christopher Barker
|