Handling Menubars in WXGlade
kyosohma at gmail.com
kyosohma at gmail.com
Mon Nov 26 09:05:13 EST 2007
On Nov 23, 7:57 am, "jatin patni" <jatinpa... at gmail.com> wrote:
> Hi, I recently started working on WXGlade...
>
> I found some amount of documentation online....
>
> I am having problems integrating event handlers with Menubars....I
> want each menu item to open a new window with custom made
> controls...but I can't find it anywhere.....Writing event handler is
> secondary actually...How can I attach each menu item with a custom
> dialog or another window....
Actually, using the handler would be primary, not secondary. Here's
how I would do it. I would bind each menu item to a separate handler
and within the handler I would call instantiate the window or dialog.
For example, below I bind my "Save" menu item to a handler called
"onSave".
self.Bind(wx.EVT_MENU, self.onSave, save_menu_item)
In the handler, I can save the programs input in many different ways.
I could open a "Save" dialog to allow the user to choose where it gets
saved, for example.
>
> Sorry for the newbie slang....I am new to programming...
> Thanks
>
> --
> jatinpa... at gmail.com
> Ph: 91-9953411751http://jatinpatni.co.nr
I would also recommend that you post to the wxPython user's group as
they'll be much better suited to answering wx questions. Here's where
you'd need to go: http://wxpython.org/maillist.php
Mike
More information about the Python-list
mailing list