wx.grid.GridCellAttr
Inheritance diagram for wx.grid.GridCellAttr:
Description
This class can be used to alter the cells’ appearance in the grid by changing their colour, font, etc... from default.
An object of this class may be returned by wx.grid.GridTableBase.GetAttr().
Class API
Methods
-
__init__(attrDefault=None)
Constructor specifying some of the often used attributes.
Parameters:
Returns:
wx.grid.GridCellAttr
-
Clone()
Creates a new copy of this object.
Returns:
wx.grid.GridCellAttr
-
DecRef()
- This class is reference counted: it is created with ref count of 1, so calling DecRef() once will delete it.
Calling IncRef() allows to lock it until the matching DecRef() is called.
-
GetAlignment()
Returns the attribute horizontal and vertical alignments.
See SetAlignment for the returned values.
Returns:
(hAlign, vAlign)
-
GetBackgroundColour()
Returns the attribute background colour.
Returns:
wx.Colour
-
GetEditor(grid, row, col)
Returns the attribute editor.
Parameters:
Returns:
wx.grid.GridCellEditor
-
GetFont()
Returns the attribute font.
Returns:
wx.Font
-
GetKind()
- No docstrings available for this method.
-
GetOverflow()
- No docstrings available for this method.
-
GetRenderer(grid, grid, grid)
Returns the attribute renderer.
Parameters:
Returns:
wx.grid.GridCellRenderer
-
GetSize()
- No docstrings available for this method.
-
GetTextColour()
Returns the attribute text colour.
Returns:
wx.Colour
-
HasAlignment()
Returns whether the alignment flag has been set or not.
Returns:
bool
-
HasBackgroundColour()
Returns whether the background colour has been set or not.
Returns:
bool
-
HasEditor()
Returns whether the attribute has an associated editor or not.
Returns:
bool
-
HasFont()
Returns whether the font has been set or not.
Returns:
bool
-
HasOverflowMode()
- No docstrings available for this method.
-
HasReadWriteMode()
- No docstrings available for this method.
-
HasRenderer()
Returns whether the attribute has an associated renderer or not.
Returns:
bool
-
HasTextColour()
Returns whether the text colour has been set or not.
Returns:
bool
-
IncRef()
- This class is reference counted: it is created with ref count of 1, so calling DecRef() once will delete it.
Calling IncRef() allows to lock it until the matching DecRef() is called.
-
IsReadOnly()
Returns whether the attribute has the readOnly flag set or not.
Returns:
bool
-
MergeWith(mergefrom)
Merges this attribute with another one.
Parameters:
-
SetAlignment(hAlign, vAlign)
Sets the alignment.
Parameters:
- hAlign (int): can be one of wx.ALIGN_LEFT, wx.ALIGN_CENTRE or wx.ALIGN_RIGHT.
- vAlign (int): can be one of wx.ALIGN_TOP, wx.ALIGN_CENTRE or wx.ALIGN_BOTTOM.
-
SetBackgroundColour(colBack)
Sets the background colour.
Parameters:
-
SetDefAttr(defAttr)
Sets a default attribute.
Parameters:
-
SetEditor(editor)
Sets the editor for this attribute.
Parameters:
-
SetFont(font)
Sets the font.
Parameters:
-
SetKind(kind)
-
Parameters:
-
SetOverflow(allow=True)
-
Parameters:
-
SetReadOnly(isReadOnly=True)
Sets the attribute as read-only if isReadOnly is True.
Parameters:
-
SetRenderer(renderer)
Sets the attribute renderer.
Parameters:
-
SetSize(num_rows, num_cols)
Allows this attribute to span more than 1 rows and/or columns.
Parameters:
- num_rows (int): Number of rows to span.
- num_cols (int): Number of columns to span.
-
SetTextColour(colText)
Sets the text colour.
Parameters: