]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/demo/wxNotebook.py
jconfig.h uses configures results
[wxWidgets.git] / utils / wxPython / demo / wxNotebook.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
3import ColorPanel
4
5#----------------------------------------------------------------------------
6
7def runTest(frame, nb, log):
8
9 testWin = wxNotebook(nb, -1)
10
11 win = ColorPanel.ColoredPanel(testWin, wxBLUE)
12 testWin.AddPage(win, "Blue")
13 st = wxStaticText(win, -1,
14 "You can put nearly any type of window here!",
15 wxPoint(10, 10))
16 st.SetForegroundColour(wxWHITE)
17 st.SetBackgroundColour(wxBLUE)
18
19 win = ColorPanel.ColoredPanel(testWin, wxRED)
20 testWin.AddPage(win, "Red")
21
22 win = ColorPanel.ColoredPanel(testWin, wxGREEN)
23 testWin.AddPage(win, "Green")
24
25 win = ColorPanel.ColoredPanel(testWin, wxCYAN)
26 testWin.AddPage(win, "Cyan")
27
28 win = ColorPanel.ColoredPanel(testWin, wxWHITE)
29 testWin.AddPage(win, "White")
30
31 win = ColorPanel.ColoredPanel(testWin, wxBLACK)
32 testWin.AddPage(win, "Black")
33
34 win = ColorPanel.ColoredPanel(testWin, wxNamedColour('MIDNIGHT BLUE'))
35 testWin.AddPage(win, "MIDNIGHT BLUE")
36
37 win = ColorPanel.ColoredPanel(testWin, wxNamedColour('INDIAN RED'))
38 testWin.AddPage(win, "INDIAN RED")
39
40 return testWin
41
42#----------------------------------------------------------------------------
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58overview = """\
59This class represents a notebook control, which manages multiple windows with associated tabs.
60
61To use the class, create a wxNotebook object and call AddPage or InsertPage, passing a window to be used as the page. Do not explicitly delete the window for a page that is currently managed by wxNotebook.
62
63wxNotebook()
64-------------------------
65
66Default constructor.
67
68wxNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size, long style = 0, const wxString& name = "notebook")
69
70Constructs a notebook control.
71
72Parameters
73-------------------
74
75parent = The parent window. Must be non-NULL.
76
77id = The window identifier.
78
79pos = The window position.
80
81size = The window size.
82
83style = The window style. Its value is a bit list of zero or more of wxTC_MULTILINE, wxTC_RIGHTJUSTIFY, wxTC_FIXEDWIDTH and wxTC_OWNERDRAW.
84"""