wx.ItemAttr¶
Represents the attributes (colour, font, …) of an item of a control with multiple items such as e.g.
Added in version 4.1/wxWidgets-3.1.1: (previous versions had a similar ListItemAttr class)
See also
Class Hierarchy¶
Methods Summary¶
Default Constructor. |
|
Returns the currently set background colour. |
|
Returns the currently set font. |
|
Returns the currently set text colour. |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Sets a new background colour. |
|
Sets a new font. |
|
Sets a new text colour. |
|
Compare two item attributes for inequality. |
|
Compare two item attributes for equality. |
Properties Summary¶
See |
Class API¶
- class wx.ItemAttr(object)¶
Possible constructors:
ItemAttr() -> None ItemAttr(colText, colBack, font) -> None
Represents the attributes (colour, font, …) of an item of a control with multiple items such as e.g.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
Default Constructor.
- Return type:
None
__init__ (self, colText, colBack, font)
Construct a wx.ItemAttr with the specified foreground and background colours and font.
- 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
See also
- 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)
- Return type:
None
- SetTextColour(self, colour)¶
Sets a new text colour.
- Parameters:
colour (wx.Colour)
- Return type:
None
- __ne__(self, other)¶
Compare two item attributes for inequality.
- Parameters:
other (wx.ItemAttr)
- Return type:
bool
- __eq__(self, other)¶
Compare two item attributes for equality.
- Parameters:
other (wx.ItemAttr)
- Return type:
bool
Properties¶
- BackgroundColour¶
- TextColour¶
See
GetTextColour
andSetTextColour