GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.wxpython.org — wx.Notebook — wxPython 4.3.2 Docs
|
Constructs a notebook control. |
|
Changes the selection to the given page, returning the previous selection. |
|
Creates a notebook control. |
|
Returns the image index for the given page. |
|
Returns the string for the given page. |
|
Returns the number of rows in the notebook control. |
|
Returns the currently selected page, or |
|
This is a convenience function mapping |
|
Return the rectangle of the given page tab in window coordinates. |
|
If running under Windows and themes are enabled for the application, this function returns a suitable colour for painting the background of a notebook page, and can be passed to |
|
Inserts a new page at the specified position. |
|
Sets the amount of space around each page’s icon and label, in pixels. |
|
Sets the image index for the given page. |
|
Sets the text for the given page. |
|
Sets the selection to the given page, returning the previous selection. |
Properties Summary¶See |
|
See |
|
Class API¶Possible constructors:
Notebook() -> None Notebook(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=NotebookNameStr) -> None
This class represents a notebook control, which manages multiple windows with associated tabs.
__init__ (self)
Constructs a notebook control.
None
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=NotebookNameStr)
Constructs a notebook control.
Note that sometimes you can reduce flicker by passing the wx.CLIP_CHILDREN window style.
parent (wx.Window) – The parent window. Must be non-null.
id (wx.WindowID) – The window identifier.
pos (wx.Point) – The window position.
size (wx.Size) – The window size.
style (long) – The window style. See wx.Notebook.
name (string) – The name of the control.
None
Changes the selection to the given page, returning the previous selection.
This function behaves as SetSelection but does not generate the page changing events.
See User Generated Events vs Programmatically Generated Events for more information.
page (int)
int
Creates a notebook control.
See wx.Notebook for a description of the parameters.
variant (WindowVariant)
Returns the image index for the given page.
nPage (int)
int
Returns the string for the given page.
nPage (int)
str
Returns the number of rows in the notebook control.
int
Returns the currently selected page, or NOT_FOUND if none was selected.
Note that this method may return either the previously or newly selected page when called from the EVT_BOOKCTRL_PAGE_CHANGED handler depending on the platform and so wx.BookCtrlEvent.GetSelection should be used instead in this case.
int
This is a convenience function mapping wx.BK_TOP etc styles to one of the Direction enum elements.
Added in version 4.3/wxWidgets-3.3.0.
Return the rectangle of the given page tab in window coordinates.
This function always returns the rectangle for the specified tab, even if the tab is currently not visible.
If page is invalid, an assert failure is triggered and an empty rectangle is returned.
page (int)
Added in version 4.3/wxWidgets-3.3.0.
Note
Currently only available in Univ and MSW and always asserts in the other ports.
If running under Windows and themes are enabled for the application, this function returns a suitable colour for painting the background of a notebook page, and can be passed to SetBackgroundColour .
Otherwise, an uninitialised colour will be returned.
Inserts a new page at the specified position.
index (int) – Specifies the position for the new page.
page (wx.Window) – Specifies the new page.
text (string) – Specifies the text of the new page. Note that it may contain mnemonic characters, see SetPageText for more information.
select (bool) – Specifies whether the page should be selected.
imageId (int) – Specifies the optional image index for the new page.
bool
True if successful, False otherwise.
Note
Do not delete the page, it will be deleted by the book control.
See also
Sets the amount of space around each page’s icon and label, in pixels.
padding (wx.Size)
None
Note
The vertical padding cannot be changed in wxGTK.
Sets the image index for the given page.
image is an index into the image list which was set with SetImageList .
page (int)
image (int)
bool
Sets the text for the given page.
The text may contain mnemonics, i.e. accelerator characters preceded by the ampersand ( & ) character. If you need to include a literal ampersand in the text, you need to float it, i.e. use && .
page (int)
text (string)
bool
Sets the selection to the given page, returning the previous selection.
Notice that the call to this function generates the page changing events, use the ChangeSelection function if you don’t want these events to be generated.
page (int)
int
See also
See GetRowCount
See GetSelection and SetSelection