]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxNotebook.py
2 from wxPython
. wx
import *
7 import wxScrolledWindow
9 #----------------------------------------------------------------------------
11 def runTest ( frame
, nb
, log
):
13 testWin
= wxNotebook ( nb
, - 1 , style
= wxNB_BOTTOM
)
15 win
= ColorPanel
. ColoredPanel ( testWin
, wxBLUE
)
16 testWin
. AddPage ( win
, "Blue" )
17 st
= wxStaticText ( win
, - 1 ,
18 "You can put nearly any type of window here, \n "
19 "and the tabs can be on any side... (look below.)" ,
21 st
. SetForegroundColour ( wxWHITE
)
22 st
. SetBackgroundColour ( wxBLUE
)
24 win
= ColorPanel
. ColoredPanel ( testWin
, wxRED
)
25 testWin
. AddPage ( win
, "Red" )
27 win
= wxScrolledWindow
. MyCanvas ( testWin
)
28 testWin
. AddPage ( win
, 'ScrolledWindow' )
30 win
= ColorPanel
. ColoredPanel ( testWin
, wxGREEN
)
31 testWin
. AddPage ( win
, "Green" )
33 win
= wxGrid
. TestGrid ( testWin
, log
)
34 testWin
. AddPage ( win
, "Grid" )
36 win
= wxListCtrl
. TestListCtrlPanel ( testWin
, log
)
37 testWin
. AddPage ( win
, 'List' )
39 win
= ColorPanel
. ColoredPanel ( testWin
, wxCYAN
)
40 testWin
. AddPage ( win
, "Cyan" )
42 win
= ColorPanel
. ColoredPanel ( testWin
, wxWHITE
)
43 testWin
. AddPage ( win
, "White" )
45 win
= ColorPanel
. ColoredPanel ( testWin
, wxBLACK
)
46 testWin
. AddPage ( win
, "Black" )
48 win
= ColorPanel
. ColoredPanel ( testWin
, wxNamedColour ( 'MIDNIGHT BLUE' ))
49 testWin
. AddPage ( win
, "MIDNIGHT BLUE" )
51 win
= ColorPanel
. ColoredPanel ( testWin
, wxNamedColour ( 'INDIAN RED' ))
52 testWin
. AddPage ( win
, "INDIAN RED" )
56 #----------------------------------------------------------------------------
73 This class represents a notebook control, which manages multiple windows with associated tabs.
75 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.
78 -------------------------
82 wxNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size, long style = 0, const wxString& name = "notebook")
84 Constructs a notebook control.
89 parent = The parent window. Must be non-NULL.
91 id = The window identifier.
93 pos = The window position.
95 size = The window size.
97 style = The window style. Its value is a bit list of zero or more of wxTC_MULTILINE, wxTC_RIGHTJUSTIFY, wxTC_FIXEDWIDTH and wxTC_OWNERDRAW.