By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,330 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,330 IT Pros & Developers. It's quick & easy.

open new window frame?

P: 12
i'm new to python... im making a GUI for an image information editing program that i am doing for school. i have a button in my menu bar that i want to open a new window (same GUI) just like in internet explorer when you click new window. hope that makes sense... i'd imagine it's simple to do, but im stuck. any help? much apprecited! i have the button... basically need a definition... new window frame.
Aug 7 '07 #1
Share this Question
Share on Google+
1 Reply

P: 12
i'm new to python... im making a GUI for an image information editing program that i am doing for school. i have a button in my menu bar that i want to open a new window (same GUI) just like in internet explorer when you click new window. hope that makes sense... i'd imagine it's simple to do, but im stuck. any help? much apprecited! i have the button... basically need a definition... new window frame.
never mind guys, figured it out myself!

Expand|Select|Wrap|Line Numbers
  1. #Menubar
  2. new = wx.MenuItem(file, 101, '&New\tCtrl+N', 'Creates a new document')
  3.          new.SetBitmap(wx.Bitmap('icons/stock_new-16.png'))
  4.          file.AppendItem(new) 
  5.  
  6.  
  7. #Button Bind
  8. self.Bind(wx.EVT_MENU, self.NewApplication, id=101)
  9.  
  10.  
  11. #Menubar button- new window method
  12. def NewApplication(self, event):
  13.          editor = Editor(None, -1, 'Editor')
  14.          editor.Centre()
  15.          editor.Show()
Aug 7 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.