.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.dataview.DataViewItemAttr: ========================================================================================================================================== |phoenix_title| **wx.dataview.DataViewItemAttr** ========================================================================================================================================== This class is used to indicate to a :ref:`wx.dataview.DataViewCtrl` that a certain item (see :ref:`wx.dataview.DataViewItem`) has extra font attributes for its renderer. For this, it is required to override :meth:`wx.dataview.DataViewModel.GetAttr` . Attributes are currently only supported by DataViewTextRendererText. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class DataViewItemAttr:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.dataview.DataViewItemAttr.__init__` Constructor. :meth:`~wx.dataview.DataViewItemAttr.GetBackgroundColour` Returns the colour to be used for the background. :meth:`~wx.dataview.DataViewItemAttr.GetBold` Returns value of the bold property. :meth:`~wx.dataview.DataViewItemAttr.GetColour` Returns this attribute's colour. :meth:`~wx.dataview.DataViewItemAttr.GetEffectiveFont` Return the font based on the given one with this attribute applied to it. :meth:`~wx.dataview.DataViewItemAttr.GetItalic` Returns value of the italics property. :meth:`~wx.dataview.DataViewItemAttr.HasBackgroundColour` Returns ``True`` if the background colour property has been set. :meth:`~wx.dataview.DataViewItemAttr.HasColour` Returns ``True`` if the colour property has been set. :meth:`~wx.dataview.DataViewItemAttr.HasFont` Returns ``True`` if any property affecting the font has been set. :meth:`~wx.dataview.DataViewItemAttr.IsDefault` Returns ``True`` if none of the properties have been set. :meth:`~wx.dataview.DataViewItemAttr.SetBackgroundColour` Call this to set the background colour to use. :meth:`~wx.dataview.DataViewItemAttr.SetBold` Call this to indicate that the item shall be displayed in bold text. :meth:`~wx.dataview.DataViewItemAttr.SetColour` Call this to indicate that the item shall be displayed with that colour. :meth:`~wx.dataview.DataViewItemAttr.SetItalic` Call this to indicate that the item shall be displayed in italic text. :meth:`~wx.dataview.DataViewItemAttr.SetStrikethrough` Call this to indicate that the item shall be displayed in strikethrough text. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.dataview.DataViewItemAttr.BackgroundColour` See :meth:`~wx.dataview.DataViewItemAttr.GetBackgroundColour` and :meth:`~wx.dataview.DataViewItemAttr.SetBackgroundColour` :attr:`~wx.dataview.DataViewItemAttr.Bold` See :meth:`~wx.dataview.DataViewItemAttr.GetBold` and :meth:`~wx.dataview.DataViewItemAttr.SetBold` :attr:`~wx.dataview.DataViewItemAttr.Colour` See :meth:`~wx.dataview.DataViewItemAttr.GetColour` and :meth:`~wx.dataview.DataViewItemAttr.SetColour` :attr:`~wx.dataview.DataViewItemAttr.Italic` See :meth:`~wx.dataview.DataViewItemAttr.GetItalic` and :meth:`~wx.dataview.DataViewItemAttr.SetItalic` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.dataview.DataViewItemAttr(object) **Possible constructors**:: DataViewItemAttr() This class is used to indicate to a DataViewCtrl that a certain item (see DataViewItem) has extra font attributes for its renderer. .. method:: __init__(self) Constructor. .. method:: GetBackgroundColour(self) Returns the colour to be used for the background. :rtype: `Colour` .. method:: GetBold(self) Returns value of the bold property. :rtype: `bool` .. method:: GetColour(self) Returns this attribute's colour. :rtype: `Colour` .. method:: GetEffectiveFont(self, font) Return the font based on the given one with this attribute applied to it. :param `font`: :type `font`: wx.Font :rtype: `Font` .. method:: GetItalic(self) Returns value of the italics property. :rtype: `bool` .. method:: HasBackgroundColour(self) Returns ``True`` if the background colour property has been set. :rtype: `bool` .. method:: HasColour(self) Returns ``True`` if the colour property has been set. :rtype: `bool` .. method:: HasFont(self) Returns ``True`` if any property affecting the font has been set. :rtype: `bool` .. method:: IsDefault(self) Returns ``True`` if none of the properties have been set. :rtype: `bool` .. method:: SetBackgroundColour(self, colour) Call this to set the background colour to use. :param `colour`: :type `colour`: wx.Colour .. versionadded:: 2.9.4 - Generic .. versionadded:: 4.1/wxWidgets-3.1.1 - wxGTK .. versionadded:: 4.1/wxWidgets-3.1.4 - wxOSX .. method:: SetBold(self, set) Call this to indicate that the item shall be displayed in bold text. :param `set`: :type `set`: bool .. method:: SetColour(self, colour) Call this to indicate that the item shall be displayed with that colour. :param `colour`: :type `colour`: wx.Colour .. method:: SetItalic(self, set) Call this to indicate that the item shall be displayed in italic text. :param `set`: :type `set`: bool .. method:: SetStrikethrough(self, set) Call this to indicate that the item shall be displayed in strikethrough text. Currently this attribute is only supported in the generic version of :ref:`wx.dataview.DataViewCtrl` and GTK and ignored by the native macOS implementations. :param `set`: :type `set`: bool .. versionadded:: 4.1/wxWidgets-3.1.2 .. attribute:: BackgroundColour See :meth:`~wx.dataview.DataViewItemAttr.GetBackgroundColour` and :meth:`~wx.dataview.DataViewItemAttr.SetBackgroundColour` .. attribute:: Bold See :meth:`~wx.dataview.DataViewItemAttr.GetBold` and :meth:`~wx.dataview.DataViewItemAttr.SetBold` .. attribute:: Colour See :meth:`~wx.dataview.DataViewItemAttr.GetColour` and :meth:`~wx.dataview.DataViewItemAttr.SetColour` .. attribute:: Italic See :meth:`~wx.dataview.DataViewItemAttr.GetItalic` and :meth:`~wx.dataview.DataViewItemAttr.SetItalic`