469,616 Members | 1,673 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

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 5414
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
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.