wx.lib.agw.flatnotebook.PageInfo¶
This class holds all the information (caption, image, etc…) belonging to a
single tab in FlatNotebook
.
Class Hierarchy¶
Methods Summary¶
Default Class Constructor. |
|
Sets the tab enabled or disabled. |
|
Returns the tab caption. |
|
Returns the tab colour. |
|
Returns whether the tab is enabled or not. |
|
Returns the tab image index. |
|
Returns the tab text colour if it has been set previously, or |
|
Returns the tab position. |
|
Returns the tab region. |
|
Returns the tab size. |
|
Returns the tab angle. |
|
Returns the button ‘X’ area rect. |
|
Sets the tab caption. |
|
Sets the tab colour. |
|
Sets the tab image index. |
|
Sets the tab text colour for this tab. |
|
Sets the tab position. |
|
Sets the tab region. |
|
Sets the tab size. |
|
Sets the tab header angle. |
|
Sets the button ‘X’ area rect. |
Class API¶
- class PageInfo(object)¶
This class holds all the information (caption, image, etc…) belonging to a single tab in
FlatNotebook
.
Methods¶
- __init__(self, caption='', imageindex=-1, tabangle=0, enabled=True)¶
Default Class Constructor.
- Parameters:
caption – the tab caption;
imageindex – the tab image index based on the assigned (set)
wx.ImageList
(if any);tabangle – the tab angle (only on standard tabs, from 0 to 15 degrees);
enabled – sets the tab as enabled or disabled.
- EnableTab(self, enabled)¶
Sets the tab enabled or disabled.
- Parameters:
enabled –
True
to enable a tab,False
to disable it.
- GetCaption(self)¶
Returns the tab caption.
- GetColour(self)¶
Returns the tab colour.
- GetEnabled(self)¶
Returns whether the tab is enabled or not.
- GetImageIndex(self)¶
Returns the tab image index.
- GetPageTextColour(self)¶
Returns the tab text colour if it has been set previously, or
None
otherwise.
- GetPosition(self)¶
Returns the tab position.
- GetRegion(self)¶
Returns the tab region.
- GetSize(self)¶
Returns the tab size.
- GetTabAngle(self)¶
Returns the tab angle.
- GetXRect(self)¶
Returns the button ‘X’ area rect.
- SetCaption(self, value)¶
Sets the tab caption.
- Parameters:
value – the new tab caption string.
- SetColour(self, colour)¶
Sets the tab colour.
- Parameters:
colour – a valid
wx.Colour
object or any typemap supported by wxWidgets/wxPython to generate a colour (i.e., a hex string, a colour name, a 3 or 4 integer tuple).
- SetImageIndex(self, value)¶
Sets the tab image index.
- Parameters:
value – an index within the
FlatNotebook
image list specifying the image to use for this tab.
- SetPageTextColour(self, colour)¶
Sets the tab text colour for this tab.
- Parameters:
colour – an instance of
wx.Colour
. You can passNone
orNullColour
to return to the default page text colour.
- SetTabAngle(self, value)¶
Sets the tab header angle.
- Parameters:
value – the tab header angle (0 <= value <= 15 degrees).