AGW Logo

agw_title TreeItemAttr

Creates the item attributes (text colour, background colour and font).

Note

This class is inspired by the wxWidgets generic implementation of wx.TreeItemAttr.

hierarchy Inheritance Diagram

Inheritance diagram for: TreeItemAttr

Inheritance diagram of TreeItemAttr


method_summary Methods Summary

__init__Default class constructor.
GetBackgroundColourReturns the attribute background colour.
GetFontReturns the attribute font.
GetTextColourReturns the attribute text colour.
HasBackgroundColourReturns whether the attribute has background colour.
HasFontReturns whether the attribute has font.
HasTextColourReturns whether the attribute has text colour.
SetBackgroundColourSets the item background colour attribute.
SetFontSets the item font attribute.
SetTextColourSets the text colour attribute.

API Class API

class TreeItemAttr(object)[source]

Creates the item attributes (text colour, background colour and font).

Note

This class is inspired by the wxWidgets generic implementation of wx.TreeItemAttr.



__init__(colText=wx.NullColour, colBack=wx.NullColour, font=wx.NullFont)[source]

Default class constructor. For internal use: do not call it in your code!

Parameters:
  • colText – the text colour, an instance of wx.Colour;
  • colBack – the tree item background colour, an instance of wx.Colour;

  • font – the tree item font, an instance of wx.Font.


GetBackgroundColour()[source]

Returns the attribute background colour.

Returns:An instance of wx.Colour.


GetFont()[source]

Returns the attribute font.

Returns:An instance of wx.Font.


GetTextColour()[source]

Returns the attribute text colour.

Returns:An instance of wx.Colour.


HasBackgroundColour()[source]

Returns whether the attribute has background colour.

Returns:True if the background colour attribute has been set, False otherwise.


HasFont()[source]

Returns whether the attribute has font.

Returns:True if the font attribute has been set, False otherwise.


HasTextColour()[source]

Returns whether the attribute has text colour.

Returns:True if the text colour attribute has been set, False otherwise.


SetBackgroundColour(colBack)[source]

Sets the item background colour attribute.

Parameters:colBack – an instance of wx.Colour.



SetFont(font)[source]

Sets the item font attribute.

Parameters:font – an instance of wx.Font.



SetTextColour(colText)[source]

Sets the text colour attribute.

Parameters:colText – an instance of wx.Colour.

Tree

Table Of Contents

Previous topic

TreeFindTimer

Next topic

TreeTextCtrl