Table Of Contents

Previous topic

TreeFindTimer

Next topic

TreeTextCtrl

This Page

phoenix_title TreeItemAttr

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

Note

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


class_hierarchy Inheritance Diagram

Inheritance diagram for class TreeItemAttr

Inheritance diagram of TreeItemAttr


method_summary Methods Summary

__init__ Default class constructor.
GetBackgroundColour Returns the attribute background colour.
GetFont Returns the attribute font.
GetTextColour Returns the attribute text colour.
HasBackgroundColour Returns whether the attribute has background colour.
HasFont Returns whether the attribute has font.
HasTextColour Returns whether the attribute has text colour.
SetBackgroundColour Sets the item background colour attribute.
SetFont Sets the item font attribute.
SetTextColour Sets the text colour attribute.

api Class API



class TreeItemAttr(object)

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

Note

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


Methods



__init__(self, colText=NullColour, colBack=NullColour, font=NullFont)

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

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


GetBackgroundColour(self)

Returns the attribute background colour.

Returns:An instance of Colour.


GetFont(self)

Returns the attribute font.

Returns:An instance of Font.


GetTextColour(self)

Returns the attribute text colour.

Returns:An instance of Colour.


HasBackgroundColour(self)

Returns whether the attribute has background colour.

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


HasFont(self)

Returns whether the attribute has font.

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


HasTextColour(self)

Returns whether the attribute has text colour.

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


SetBackgroundColour(self, colBack)

Sets the item background colour attribute.

Parameters:colBack – an instance of Colour.


SetFont(self, font)

Sets the item font attribute.

Parameters:font – an instance of Font.


SetTextColour(self, colText)

Sets the text colour attribute.

Parameters:colText – an instance of Colour.