.. include:: headings.inc .. currentmodule:: lib.agw.customtreectrl .. highlight:: python .. _lib.agw.customtreectrl.TreeItemAttr: ========================================================================================================================================== |phoenix_title| **TreeItemAttr** ========================================================================================================================================== Creates the item attributes (text colour, background colour and font). .. note:: This class is inspired by the wxWidgets generic implementation of :class:`TreeItemAttr`. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **TreeItemAttr** .. raw:: html

Inheritance diagram of TreeItemAttr

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.agw.customtreectrl.TreeItemAttr.__init__` Default class constructor. :meth:`~lib.agw.customtreectrl.TreeItemAttr.GetBackgroundColour` Returns the attribute background colour. :meth:`~lib.agw.customtreectrl.TreeItemAttr.GetFont` Returns the attribute font. :meth:`~lib.agw.customtreectrl.TreeItemAttr.GetTextColour` Returns the attribute text colour. :meth:`~lib.agw.customtreectrl.TreeItemAttr.HasBackgroundColour` Returns whether the attribute has background colour. :meth:`~lib.agw.customtreectrl.TreeItemAttr.HasFont` Returns whether the attribute has font. :meth:`~lib.agw.customtreectrl.TreeItemAttr.HasTextColour` Returns whether the attribute has text colour. :meth:`~lib.agw.customtreectrl.TreeItemAttr.SetBackgroundColour` Sets the item background colour attribute. :meth:`~lib.agw.customtreectrl.TreeItemAttr.SetFont` Sets the item font attribute. :meth:`~lib.agw.customtreectrl.TreeItemAttr.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 :class:`TreeItemAttr`. .. method:: __init__(self, colText=NullColour, colBack=NullColour, font=NullFont) Default class constructor. For internal use: do not call it in your code! :param `colText`: the text colour, an instance of :class:`Colour`; :param `colBack`: the tree item background colour, an instance of :class:`Colour`; :param `font`: the tree item font, an instance of :class:`Font`. .. method:: GetBackgroundColour(self) Returns the attribute background colour. :return: An instance of :class:`Colour`. .. method:: GetFont(self) Returns the attribute font. :return: An instance of :class:`Font`. .. method:: GetTextColour(self) Returns the attribute text colour. :return: An instance of :class:`Colour`. .. method:: HasBackgroundColour(self) Returns whether the attribute has background colour. :return: ``True`` if the background colour attribute has been set, ``False`` otherwise. .. method:: HasFont(self) Returns whether the attribute has font. :return: ``True`` if the font attribute has been set, ``False`` otherwise. .. method:: HasTextColour(self) Returns whether the attribute has text colour. :return: ``True`` if the text colour attribute has been set, ``False`` otherwise. .. method:: SetBackgroundColour(self, colBack) Sets the item background colour attribute. :param `colBack`: an instance of :class:`Colour`. .. method:: SetFont(self, font) Sets the item font attribute. :param `font`: an instance of :class:`Font`. .. method:: SetTextColour(self, colText) Sets the text colour attribute. :param `colText`: an instance of :class:`Colour`.