SHARE
TWEET

Aui Manager Position Test

a guest Jun 29th, 2011 337 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /usr/bin/python
  2.  
  3. import wx
  4. import wx.lib.agw.aui as aui
  5.  
  6. class myFrame(wx.Frame):
  7.     def __init__(self,parent,ID,title,position,size):
  8.         wx.Frame.__init__(self,parent,ID,title,position,size)
  9.         position1 = wx.StaticText(self,-1,'Center position1')
  10.         position2 = wx.StaticText(self,-1,'Center position2')
  11.         position3 = wx.StaticText(self,-1,'Center position3')
  12.         self.mgr = aui.AuiManager(self)
  13.         self.mgr.AddPane(position1, aui.AuiPaneInfo().Center().Position(1))
  14.         self.mgr.AddPane(position2, aui.AuiPaneInfo().Center().Position(2))
  15.         self.mgr.AddPane(position3, aui.AuiPaneInfo().Center().Position(3))
  16.         self.mgr.Update()
  17.         self.Centre()
  18.  
  19. class WXApp(wx.App):
  20.     def OnInit(self):
  21.         frame = myFrame(None,-1,'Test App',wx.DefaultPosition,wx.Size(680,550))
  22.         frame.Show(True)
  23.         self.SetTopWindow(frame)
  24.         return True
  25.  
  26. def main():
  27.     wxobj = WXApp(False)
  28.     wxobj.MainLoop()
  29.  
  30. main()
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Top