]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxNotebook.py
2 from wxPython
. wx
import *
5 #----------------------------------------------------------------------------
7 def runTest ( frame
, nb
, log
):
9 testWin
= wxNotebook ( nb
, - 1 )
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!" ,
16 st
. SetForegroundColour ( wxWHITE
)
17 st
. SetBackgroundColour ( wxBLUE
)
19 win
= ColorPanel
. ColoredPanel ( testWin
, wxRED
)
20 testWin
. AddPage ( win
, "Red" )
22 win
= ColorPanel
. ColoredPanel ( testWin
, wxGREEN
)
23 testWin
. AddPage ( win
, "Green" )
25 win
= ColorPanel
. ColoredPanel ( testWin
, wxCYAN
)
26 testWin
. AddPage ( win
, "Cyan" )
28 win
= ColorPanel
. ColoredPanel ( testWin
, wxWHITE
)
29 testWin
. AddPage ( win
, "White" )
31 win
= ColorPanel
. ColoredPanel ( testWin
, wxBLACK
)
32 testWin
. AddPage ( win
, "Black" )
34 win
= ColorPanel
. ColoredPanel ( testWin
, wxNamedColour ( 'MIDNIGHT BLUE' ))
35 testWin
. AddPage ( win
, "MIDNIGHT BLUE" )
37 win
= ColorPanel
. ColoredPanel ( testWin
, wxNamedColour ( 'INDIAN RED' ))
38 testWin
. AddPage ( win
, "INDIAN RED" )
42 #----------------------------------------------------------------------------
59 This class represents a notebook control, which manages multiple windows with associated tabs.
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.
64 -------------------------
68 wxNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size, long style = 0, const wxString& name = "notebook")
70 Constructs a notebook control.
75 parent = The parent window. Must be non-NULL.
77 id = The window identifier.
79 pos = The window position.
81 size = The window size.
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.