Handling Menubars in WXGlade

J

jatin patni

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....

Sorry for the newbie slang....I am new to programming...
Thanks
 
K

kyosohma

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,162
Latest member
GertrudeMa
Top