Phoenix Logo

phoenix_title 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 Class Hierarchy

Inheritance diagram for class DataViewItemAttr:


method_summary Methods Summary

__init__ Constructor.
GetBackgroundColour Returns the colour to be used for the background.
GetBold Returns value of the bold property.
GetColour Returns this attribute’s colour.
GetEffectiveFont Return the font based on the given one with this attribute applied to it.
GetItalic Returns value of the italics property.
HasBackgroundColour Returns True if the background colour property has been set.
HasColour Returns True if the colour property has been set.
HasFont Returns True if any property affecting the font has been set.
IsDefault Returns True if none of the properties have been set.
SetBackgroundColour Call this to set the background colour to use.
SetBold Call this to indicate that the item shall be displayed in bold text.
SetColour Call this to indicate that the item shall be displayed with that colour.
SetItalic Call this to indicate that the item shall be displayed in italic text.

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.


Methods



__init__(self)

Constructor.



GetBackgroundColour(self)

Returns the colour to be used for the background.

Return type:Colour


GetBold(self)

Returns value of the bold property.

Return type:bool


GetColour(self)

Returns this attribute’s colour.

Return type:Colour


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.

Currently this attribute is only supported in the generic version of wx.dataview.DataViewCtrl and ignored by the native GTK+ and OS X implementations.

Parameters:colour (wx.Colour) –

New in version 2.9.4.



SetBold(self, set)

Call this to indicate that the item shall be displayed in bold text.

Parameters:set (bool) –


SetColour(self, colour)

Call this to indicate that the item shall be displayed with that colour.

Parameters:colour (wx.Colour) –


SetItalic(self, set)

Call this to indicate that the item shall be displayed in italic text.

Parameters:set (bool) –

Properties



BackgroundColour

See GetBackgroundColour and SetBackgroundColour



Bold

See GetBold and SetBold



Colour

See GetColour and SetColour



Italic

See GetItalic and SetItalic