wx.dataview.DataViewItemAttr¶
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.
Class Hierarchy¶
Methods Summary¶
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. |
Properties Summary¶
Class API¶
- class wx.dataview.DataViewItemAttr(object)¶
Possible constructors:
DataViewItemAttr() -> None
This class is used to indicate to a DataViewCtrl that a certain item (see DataViewItem) has extra font attributes for its renderer.
Methods¶
- __init__(self)¶
Constructor.
- Return type:
None
- GetBold(self)¶
Returns value of the bold property.
- Return type:
bool
- GetEffectiveFont(self, font)¶
Return the font based on the given one with this attribute applied to it.
- Parameters:
font (wx.Font)
- Return type:
Font
- GetItalic(self)¶
Returns value of the italics property.
- Return type:
bool
- HasBackgroundColour(self)¶
Returns
True
if the background colour property has been set.- Return type:
bool
- HasColour(self)¶
Returns
True
if the colour property has been set.- Return type:
bool
- HasFont(self)¶
Returns
True
if any property affecting the font has been set.- Return type:
bool
- IsDefault(self)¶
Returns
True
if none of the properties have been set.- Return type:
bool
- SetBackgroundColour(self, colour)¶
Call this to set the background colour to use.
- Parameters:
colour (wx.Colour)
- Return type:
None
Added in version 2.9.4: - Generic
Added in version 4.1/wxWidgets-3.1.1: - wxGTK
Added 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.
- Parameters:
set (bool)
- Return type:
None
- SetColour(self, colour)¶
Call this to indicate that the item shall be displayed with that colour.
- Parameters:
colour (wx.Colour)
- Return type:
None
- SetItalic(self, set)¶
Call this to indicate that the item shall be displayed in italic text.
- Parameters:
set (bool)
- Return type:
None
- 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.
- Parameters:
set (bool)
- Return type:
None
Added in version 4.1/wxWidgets-3.1.2.
Properties¶
- BackgroundColour¶