]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxNotebook.py
Corrected link error for missing wxRegTipProvider::GetTip by giving it
[wxWidgets.git] / utils / wxPython / demo / wxNotebook.py
1
2 from wxPython.wx import *
3 import ColorPanel
4
5 #----------------------------------------------------------------------------
6
7 def 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
58 overview = """\
59 This class represents a notebook control, which manages multiple windows with associated tabs.
60
61 To 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
63 wxNotebook()
64 -------------------------
65
66 Default constructor.
67
68 wxNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size, long style = 0, const wxString& name = "notebook")
69
70 Constructs a notebook control.
71
72 Parameters
73 -------------------
74
75 parent = The parent window. Must be non-NULL.
76
77 id = The window identifier.
78
79 pos = The window position.
80
81 size = The window size.
82
83 style = The window style. Its value is a bit list of zero or more of wxTC_MULTILINE, wxTC_RIGHTJUSTIFY, wxTC_FIXEDWIDTH and wxTC_OWNERDRAW.
84 """