phoenix_title wx.ItemAttr

Represents the attributes (colour, font, …) of an item of a control with multiple items such as e.g.

wx.ListCtrl.

New in version 4.1/wxWidgets-3.1.1: (previous versions had a similar ListItemAttr class)


class_hierarchy Class Hierarchy

Inheritance diagram for class ItemAttr:

method_summary Methods Summary

__init__

Default Constructor.

GetBackgroundColour

Returns the currently set background colour.

GetFont

Returns the currently set font.

GetTextColour

Returns the currently set text colour.

HasBackgroundColour

Returns True if the currently set background colour is valid.

HasColours

Returns True if either text or background colour is set.

HasFont

Returns True if the currently set font is valid.

HasTextColour

Returns True if the currently set text colour is valid.

IsDefault

Returns True if this object has no custom attributes set.

SetBackgroundColour

Sets a new background colour.

SetFont

Sets a new font.

SetTextColour

Sets a new text colour.

__ne__

Compare two item attributes for inequality.

__eq__

Compare two item attributes for equality.


api Class API

class wx.ItemAttr(object)

Possible constructors:

ItemAttr()

ItemAttr(colText, colBack, font)

Represents the attributes (colour, font, …) of an item of a control with multiple items such as e.g.


Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default Constructor.



__init__ (self, colText, colBack, font)

Construct a wx.ItemAttr with the specified foreground and background colours and font.

Parameters





GetBackgroundColour(self)

Returns the currently set background colour.

Return type

wx.Colour



GetFont(self)

Returns the currently set font.

Return type

wx.Font



GetTextColour(self)

Returns the currently set text colour.

Return type

wx.Colour



HasBackgroundColour(self)

Returns True if the currently set background colour is valid.

Return type

bool



HasColours(self)

Returns True if either text or background colour is set.

Return type

bool



HasFont(self)

Returns True if the currently set font is valid.

Return type

bool



HasTextColour(self)

Returns True if the currently set text colour is valid.

Return type

bool



IsDefault(self)

Returns True if this object has no custom attributes set.

Return type

bool



SetBackgroundColour(self, colour)

Sets a new background colour.

Parameters

colour (wx.Colour) –



SetFont(self, font)

Sets a new font.

Parameters

font (wx.Font) –



SetTextColour(self, colour)

Sets a new text colour.

Parameters

colour (wx.Colour) –



__ne__(self)

Compare two item attributes for inequality.

Parameters

other (wx.ItemAttr) –



__eq__(self)

Compare two item attributes for equality.

Parameters

other (wx.ItemAttr) –


Properties

BackgroundColour

See GetBackgroundColour and SetBackgroundColour



Font

See GetFont and SetFont



TextColour

See GetTextColour and SetTextColour