Phoenix Logo

phoenix_title wx.lib.agw.flatnotebook.PageInfo

This class holds all the information (caption, image, etc...) belonging to a single tab in FlatNotebook.


class_hierarchy Class Hierarchy

Inheritance diagram for class PageInfo:


method_summary Methods Summary

__init__ Default Class Constructor.
EnableTab Sets the tab enabled or disabled.
GetCaption Returns the tab caption.
GetColour Returns the tab colour.
GetEnabled Returns whether the tab is enabled or not.
GetImageIndex Returns the tab image index.
GetPageTextColour Returns the tab text colour if it has been set previously, or None
GetPosition Returns the tab position.
GetRegion Returns the tab region.
GetSize Returns the tab size.
GetTabAngle Returns the tab angle.
GetXRect Returns the button ‘X’ area rect.
SetCaption Sets the tab caption.
SetColour Sets the tab colour.
SetImageIndex Sets the tab image index.
SetPageTextColour Sets the tab text colour for this tab.
SetPosition Sets the tab position.
SetRegion Sets the tab region.
SetSize Sets the tab size.
SetTabAngle Sets the tab header angle.
SetXRect Sets the button ‘X’ area rect.

api 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:enabledTrue 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 pass None or NullColour to return to the default page text colour.


SetPosition(self, value)

Sets the tab position.

Parameters:value – an instance of wx.Point.


SetRegion(self, points=[])

Sets the tab region.

Parameters:points – a Python list of wx.Point


SetSize(self, value)

Sets the tab size.

Parameters:value – an instance of wx.Size.


SetTabAngle(self, value)

Sets the tab header angle.

Parameters:value – the tab header angle (0 <= value <= 15 degrees).


SetXRect(self, xrect)

Sets the button ‘X’ area rect.

Parameters:xrect – an instance of wx.Rect, specifying the client rectangle of the ‘X’ button.