472,119 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

open new window frame?

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

Similar topics

5 posts views Thread by Clive Moore | last post: by
1 post views Thread by rlo | last post: by
5 posts views Thread by Kojak | last post: by
18 posts views Thread by len.hartley | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.