This class is used to indicate to a wx.dataview.DataViewCtrl that a certain item (see wx.dataview.DataViewItem) has extra font attributes for its renderer.
For this, it is required to override wx.dataview.DataViewModel.GetAttr
.
Attributes are currently only supported by DataViewTextRendererText.
Constructor. |
|
Returns the colour to be used for the background. |
|
Returns value of the bold property. |
|
Returns this attribute’s colour. |
|
Return the font based on the given one with this attribute applied to it. |
|
Returns value of the italics property. |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Call this to set the background colour to use. |
|
Call this to indicate that the item shall be displayed in bold text. |
|
Call this to indicate that the item shall be displayed with that colour. |
|
Call this to indicate that the item shall be displayed in italic text. |
|
Call this to indicate that the item shall be displayed in strikethrough text. |
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.
__init__
(self)¶Constructor.
GetBold
(self)¶Returns value of the bold property.
bool
GetEffectiveFont
(self, font)¶Return the font based on the given one with this attribute applied to it.
font (wx.Font) –
Font
GetItalic
(self)¶Returns value of the italics property.
bool
HasBackgroundColour
(self)¶Returns True
if the background colour property has been set.
bool
HasColour
(self)¶Returns True
if the colour property has been set.
bool
HasFont
(self)¶Returns True
if any property affecting the font has been set.
bool
IsDefault
(self)¶Returns True
if none of the properties have been set.
bool
SetBackgroundColour
(self, colour)¶Call this to set the background colour to use.
colour (wx.Colour) –
New in version 2.9.4: - Generic
New in version 4.1/wxWidgets-3.1.1: - wxGTK
New in version 4.1/wxWidgets-3.1.4: - wxOSX
SetBold
(self, set)¶Call this to indicate that the item shall be displayed in bold text.
set (bool) –
SetColour
(self, colour)¶Call this to indicate that the item shall be displayed with that colour.
colour (wx.Colour) –
SetItalic
(self, set)¶Call this to indicate that the item shall be displayed in italic text.
set (bool) –
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 wx.dataview.DataViewCtrl and GTK and ignored by the native macOS implementations.
set (bool) –
New in version 4.1/wxWidgets-3.1.2.
BackgroundColour
¶