phoenix_title wx.lib.agw.customtreectrl.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 Class Hierarchy

Inheritance diagram for class TreeItemAttr:

method_summary Methods Summary

__init__

Default class constructor.

GetBackgroundColour

Returns the attribute background colour.

GetBorderColour

Returns the attribute border colour.

GetFont

Returns the attribute font.

GetTextColour

Returns the attribute text colour.

HasBackgroundColour

Returns whether the attribute has background colour.

HasBorderColour

Returns whether the attribute has border colour.

HasFont

Returns whether the attribute has font.

HasTextColour

Returns whether the attribute has text colour.

SetBackgroundColour

Sets the item background colour attribute.

SetBorderColour

Sets the item border 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=wx.NullColour, colBack=wx.NullColour, colBorder=wx.NullColour, font=wx.NullFont)

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;

  • colBorder – the tree item border colour, an instance of wx.Colour;

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



GetBackgroundColour(self)

Returns the attribute background colour.

Returns

An instance of wx.Colour.



GetBorderColour(self)

Returns the attribute border colour.

Returns

An instance of wx.Colour.

New in version 0.9.6.



GetFont(self)

Returns the attribute font.

Returns

An instance of wx.Font.



GetTextColour(self)

Returns the attribute text colour.

Returns

An instance of wx.Colour.



HasBackgroundColour(self)

Returns whether the attribute has background colour.

Returns

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



HasBorderColour(self)

Returns whether the attribute has border colour.

Returns

True if the border colour attribute has been set, False otherwise.

New in version 0.9.6.



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 wx.Colour.



SetBorderColour(self, colBorder)

Sets the item border colour attribute.

Parameters

colBack – an instance of wx.Colour.

New in version 0.9.6.



SetFont(self, font)

Sets the item font attribute.

Parameters

font – an instance of wx.Font.



SetTextColour(self, colText)

Sets the text colour attribute.

Parameters

colText – an instance of wx.Colour.