SHARE
TWEET

Aui Manager Advanced Test

a guest Jun 29th, 2011 183 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.         row1p1 = wx.StaticText(self,-1,'Center row1 pos1')
  10.         row1p2 = wx.StaticText(self,-1,'Center row1 pos2')
  11.         row2p1 = wx.StaticText(self,-1,'Center row2 pos1')
  12.         row2p2 = wx.StaticText(self,-1,'Center row2 pos2')
  13.         row3p1 = wx.StaticText(self,-1,'Center row3 pos1')
  14.         row3p2 = wx.StaticText(self,-1,'Center row3 pos2')
  15.         self.mgr = aui.AuiManager(self)
  16.         self.mgr.AddPane(row1p1, aui.AuiPaneInfo().Center().Row(1).Position(1))
  17.         self.mgr.AddPane(row1p2, aui.AuiPaneInfo().Center().Row(1).Position(2))
  18.         self.mgr.AddPane(row2p1, aui.AuiPaneInfo().Center().Row(2).Position(1))
  19.         self.mgr.AddPane(row2p2, aui.AuiPaneInfo().Center().Row(2).Position(2))
  20.         self.mgr.AddPane(row3p1, aui.AuiPaneInfo().Center().Row(3).Position(1))
  21.         self.mgr.AddPane(row3p2, aui.AuiPaneInfo().Center().Row(3).Position(2))
  22.         self.mgr.Update()
  23.         self.Centre()
  24.  
  25. class WXApp(wx.App):
  26.     def OnInit(self):
  27.         frame = myFrame(None,-1,'Test App',wx.DefaultPosition,wx.Size(680,550))
  28.         frame.Show(True)
  29.         self.SetTopWindow(frame)
  30.         return True
  31.  
  32. def main():
  33.     wxobj = WXApp(False)
  34.     wxobj.MainLoop()
  35.  
  36. main()
RAW Paste Data
Top