2010-03-20 5 views
2

정보 센터 옵션이있는 창이 3 개 있습니다. 크기를 설정하는 방법을 알고 싶습니다.중앙에 배치 된 wx.aui.AuiManager 창 크기를 설정하는 방법은 무엇입니까?

이 코드를 사용 :

import wx 
import wx.aui 

class MyFrame(wx.Frame): 

    def __init__(self, parent, id=-1, title='wx.aui Test', 
       pos=wx.DefaultPosition, size=(800, 600), 
       style=wx.DEFAULT_FRAME_STYLE): 
     wx.Frame.__init__(self, parent, id, title, pos, size, style) 

     self._mgr = wx.aui.AuiManager(self) 

     # create several text controls 
     text1 = wx.TextCtrl(self, -1, 'Pane 1 - sample text', 
          wx.DefaultPosition, wx.Size(200,150), 
          wx.NO_BORDER | wx.TE_MULTILINE) 

     text2 = wx.TextCtrl(self, -1, 'Pane 2 - sample text', 
          wx.DefaultPosition, wx.Size(200,150), 
          wx.NO_BORDER | wx.TE_MULTILINE) 

     text3 = wx.TextCtrl(self, -1, 'Main content window', 
          wx.DefaultPosition, wx.Size(200,150), 
          wx.NO_BORDER | wx.TE_MULTILINE) 

     # add the panes to the manager 
     self._mgr.AddPane(text1, wx.CENTER) 
     self._mgr.AddPane(text2, wx.CENTER) 
     self._mgr.AddPane(text3, wx.CENTER) 

     # tell the manager to 'commit' all the changes just made 
     self._mgr.Update() 

     self.Bind(wx.EVT_CLOSE, self.OnClose) 


    def OnClose(self, event): 
     # deinitialize the frame manager 
     self._mgr.UnInit() 
     # delete the frame 
     self.Destroy() 


app = wx.App() 
frame = MyFrame(None) 
frame.Show() 
app.MainLoop() 

나는 우리가 창 크기를 변경할 때라는 것을 알고 싶어요. 나에게 말해 준다면, 나머지는 나 혼자서 할 수있다.

답변

1

나는 내가 원하는 것을 발견했다. wx.aui.AuiPaneInfo.dock_proportion 속성이었습니다 :)

관련 문제