AGW Logo

agw_title PageInfo

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

hierarchy Inheritance Diagram

Inheritance diagram for: PageInfo

Inheritance diagram of PageInfo


method_summary Methods Summary

__init__Default Class Constructor.
EnableTabSets the tab enabled or disabled.
GetCaptionReturns the tab caption.
GetColourReturns the tab colour.
GetEnabledReturns whether the tab is enabled or not.
GetImageIndexReturns the tab image index.
GetPageTextColourReturns the tab text colour if it has been set previously, or None
GetPositionReturns the tab position.
GetRegionReturns the tab region.
GetSizeReturns the tab size.
GetTabAngleReturns the tab angle.
GetXRectReturns the button ‘X’ area rect.
SetCaptionSets the tab caption.
SetColourSets the tab colour.
SetImageIndexSets the tab image index.
SetPageTextColourSets the tab text colour for this tab.
SetPositionSets the tab position.
SetRegionSets the tab region.
SetSizeSets the tab size.
SetTabAngleSets the tab header angle.
SetXRectSets the button ‘X’ area rect.

API Class API

class PageInfo(object)[source]

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



__init__(caption='', imageindex=-1, tabangle=0, enabled=True)[source]

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(enabled)[source]

Sets the tab enabled or disabled.

Parameters:enabledTrue to enable a tab, False to disable it.


GetCaption()[source]

Returns the tab caption.



GetColour()[source]

Returns the tab colour.



GetEnabled()[source]

Returns whether the tab is enabled or not.



GetImageIndex()[source]

Returns the tab image index.



GetPageTextColour()[source]

Returns the tab text colour if it has been set previously, or None otherwise.



GetPosition()[source]

Returns the tab position.



GetRegion()[source]

Returns the tab region.



GetSize()[source]

Returns the tab size.



GetTabAngle()[source]

Returns the tab angle.



GetXRect()[source]

Returns the button ‘X’ area rect.



SetCaption(value)[source]

Sets the tab caption.

Parameters:value – the new tab caption string.


SetColour(colour)[source]

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(value)[source]

Sets the tab image index.

Parameters:value – an index within the FlatNotebook image list specifying the image to use for this tab.


SetPageTextColour(colour)[source]

Sets the tab text colour for this tab.

Parameters:colour – an instance of wx.Colour. You can pass None or wx.NullColour to return to the default page text colour.



SetPosition(value)[source]

Sets the tab position.

Parameters:value – an instance of wx.Point.


SetRegion(points=[])[source]

Sets the tab region.

Parameters:points – a Python list of wx.Point



SetSize(value)[source]

Sets the tab size.

Parameters:value – an instance of wx.Size.


SetTabAngle(value)[source]

Sets the tab header angle.

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


SetXRect(xrect)[source]

Sets the button ‘X’ area rect.

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

Table Of Contents

Previous topic

PageContainer

Next topic

TabNavigatorWindow