Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python
- import wx
- import wx.lib.agw.aui as aui
- class myFrame(wx.Frame):
- def __init__(self,parent,ID,title,position,size):
- wx.Frame.__init__(self,parent,ID,title,position,size)
- row1p1 = wx.StaticText(self,-1,'Center row1 pos1')
- row1p2 = wx.StaticText(self,-1,'Center row1 pos2')
- row2p1 = wx.StaticText(self,-1,'Center row2 pos1')
- row2p2 = wx.StaticText(self,-1,'Center row2 pos2')
- row3p1 = wx.StaticText(self,-1,'Center row3 pos1')
- row3p2 = wx.StaticText(self,-1,'Center row3 pos2')
- self.mgr = aui.AuiManager(self)
- self.mgr.AddPane(row1p1, aui.AuiPaneInfo().Center().Row(1).Position(1))
- self.mgr.AddPane(row1p2, aui.AuiPaneInfo().Center().Row(1).Position(2))
- self.mgr.AddPane(row2p1, aui.AuiPaneInfo().Center().Row(2).Position(1))
- self.mgr.AddPane(row2p2, aui.AuiPaneInfo().Center().Row(2).Position(2))
- self.mgr.AddPane(row3p1, aui.AuiPaneInfo().Center().Row(3).Position(1))
- self.mgr.AddPane(row3p2, aui.AuiPaneInfo().Center().Row(3).Position(2))
- self.mgr.Update()
- self.Centre()
- class WXApp(wx.App):
- def OnInit(self):
- frame = myFrame(None,-1,'Test App',wx.DefaultPosition,wx.Size(680,550))
- frame.Show(True)
- self.SetTopWindow(frame)
- return True
- def main():
- wxobj = WXApp(False)
- wxobj.MainLoop()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement