]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxSplitterWindow.py
wxPython stuff:
[wxWidgets.git] / utils / wxPython / demo / wxSplitterWindow.py
1
2 from wxPython.wx import *
3
4
5 #---------------------------------------------------------------------------
6
7 def runTest(frame, nb, log):
8 splitter = wxSplitterWindow(nb, -1)
9
10 p1 = wxWindow(splitter, -1)
11 p1.SetBackgroundColour(wxRED)
12 wxStaticText(p1, -1, "Panel One", wxPoint(5,5)).SetBackgroundColour(wxRED)
13
14 p2 = wxWindow(splitter, -1)
15 p2.SetBackgroundColour(wxBLUE)
16 wxStaticText(p2, -1, "Panel Two", wxPoint(5,5)).SetBackgroundColour(wxBLUE)
17
18 splitter.SetMinimumPaneSize(20)
19 splitter.SplitVertically(p1, p2)
20 splitter.SetSashPosition(100)
21
22 return splitter
23
24
25 #---------------------------------------------------------------------------
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 overview = """\
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.
43
44 wxSplitterWindow()
45 -----------------------------------
46
47 Default constructor.
48
49 wxSplitterWindow(wxWindow* parent, wxWindowID id, int x, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = "splitterWindow")
50
51 Constructor for creating the window.
52
53 Parameters
54 -------------------
55
56 parent = The parent of the splitter window.
57
58 id = The window identifier.
59
60 pos = The window position.
61
62 size = The window size.
63
64 style = The window style. See wxSplitterWindow.
65
66 name = The window name.
67 """