]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxSplitterWindow.py
2 from wxPython
. wx
import *
5 #---------------------------------------------------------------------------
7 def runTest ( frame
, nb
, log
):
8 splitter
= wxSplitterWindow ( nb
, - 1 )
10 p1
= wxWindow ( splitter
, - 1 )
11 p1
. SetBackgroundColour ( wxRED
)
12 wxStaticText ( p1
, - 1 , "Panel One" , wxPoint ( 5 , 5 )). SetBackgroundColour ( wxRED
)
14 p2
= wxWindow ( splitter
, - 1 )
15 p2
. SetBackgroundColour ( wxBLUE
)
16 wxStaticText ( p2
, - 1 , "Panel Two" , wxPoint ( 5 , 5 )). SetBackgroundColour ( wxBLUE
)
18 splitter
. SetMinimumPaneSize ( 20 )
19 splitter
. SplitVertically ( p1
, p2
)
20 splitter
. SetSashPosition ( 100 )
25 #---------------------------------------------------------------------------
42 This class manages up to two subwindows. The current view can be split into two programmatically (perhaps from a menu command), and unsplit either programmatically or via the wxSplitterWindow user interface.
45 -----------------------------------
49 wxSplitterWindow(wxWindow* parent, wxWindowID id, int x, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = "splitterWindow")
51 Constructor for creating the window.
56 parent = The parent of the splitter window.
58 id = The window identifier.
60 pos = The window position.
62 size = The window size.
64 style = The window style. See wxSplitterWindow.
66 name = The window name.