wxGridCellAttr (wx v2.5.4)

Copy Markdown View Source

This class can be used to alter the cells' appearance in the grid by changing their attributes from the defaults.

An object of this class may be returned by wxGridTableBase::GetAttr() (not implemented in wx).

Note that objects of this class are reference-counted and it's recommended to use wxGridCellAttrPtr smart pointer class when working with them to avoid memory leaks.

wxWidgets docs: wxGridCellAttr

Summary

Functions

Get the alignment to use for the cell with the given attribute.

Returns the background colour.

Returns the cell editor.

Returns the font.

Returns the cell renderer.

Returns the text colour.

Returns true if this attribute has a valid alignment set.

Returns true if this attribute has a valid background colour set.

Returns true if this attribute has a valid cell editor set.

Returns true if this attribute has a valid font set.

Returns true if this attribute has a valid cell renderer set.

Returns true if this attribute has a valid text colour set.

Returns true if this cell is set as read-only.

Sets the background colour.

Sets the editor to be used with the cells with this attribute.

Sets the font.

Sets the cell as read-only.

Sets the renderer to be used for cells with this attribute.

Sets the text colour.

Types

wxGridCellAttr()

-type wxGridCellAttr() :: wx:wx_object().

Functions

getAlignment(This) -> Result

Types

This = wxGridCellAttr()
Result = {HAlign :: integer(), VAlign :: integer()}

Get the alignment to use for the cell with the given attribute.

If this attribute doesn't specify any alignment, the default attribute alignment is used (which can be changed using wxGrid:setDefaultCellAlignment/3 but is left and top by default).

Notice that hAlign and vAlign values are always overwritten by this function, use GetNonDefaultAlignment() (not implemented in wx) if this is not desirable.

getBackgroundColour(This :: wxGridCellAttr()) -> wx:wx_colour4()

Returns the background colour.

getEditor(This, Grid, Row, Col) -> Result

Types

This = wxGridCellAttr()
Grid = wxGrid:wxGrid()
Row = Col = integer()
Result = wxGridCellEditor:wxGridCellEditor()

Returns the cell editor.

The caller is responsible for calling DecRef() (not implemented in wx) on the returned pointer, use GetEditorPtr() (not implemented in wx) to do it automatically.

getFont(This :: wxGridCellAttr()) -> wxFont:wxFont()

Returns the font.

getRenderer(This, Grid, Row, Col) -> Result

Types

This = wxGridCellAttr()
Grid = wxGrid:wxGrid()
Row = Col = integer()
Result = wxGridCellRenderer:wxGridCellRenderer()

Returns the cell renderer.

The caller is responsible for calling DecRef() (not implemented in wx) on the returned pointer, use GetRendererPtr() (not implemented in wx) to do it automatically.

getTextColour(This :: wxGridCellAttr()) -> wx:wx_colour4()

Returns the text colour.

hasAlignment(This :: wxGridCellAttr()) -> boolean()

Returns true if this attribute has a valid alignment set.

hasBackgroundColour(This :: wxGridCellAttr()) -> boolean()

Returns true if this attribute has a valid background colour set.

hasEditor(This :: wxGridCellAttr()) -> boolean()

Returns true if this attribute has a valid cell editor set.

hasFont(This :: wxGridCellAttr()) -> boolean()

Returns true if this attribute has a valid font set.

hasRenderer(This :: wxGridCellAttr()) -> boolean()

Returns true if this attribute has a valid cell renderer set.

hasTextColour(This :: wxGridCellAttr()) -> boolean()

Returns true if this attribute has a valid text colour set.

isReadOnly(This :: wxGridCellAttr()) -> boolean()

Returns true if this cell is set as read-only.

setAlignment(This, HAlign, VAlign) -> ok

Types

This = wxGridCellAttr()
HAlign = VAlign = integer()

Sets the alignment.

hAlign can be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT and vAlign can be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.

setBackgroundColour(This :: wxGridCellAttr(), ColBack :: wx:wx_colour()) -> ok

Sets the background colour.

setDefAttr(This :: wxGridCellAttr(), DefAttr :: wxGridCellAttr()) -> ok

Types

This = DefAttr = wxGridCellAttr()

setEditor(This, Editor) -> ok

Sets the editor to be used with the cells with this attribute.

setFont(This :: wxGridCellAttr(), Font :: wxFont:wxFont()) -> ok

Sets the font.

setReadOnly(This) ≡ setReadOnly(This, [])

setReadOnly/2

-spec setReadOnly(This) -> ok when This :: wxGridCellAttr().
-spec setReadOnly(This, [Option]) -> ok when This :: wxGridCellAttr(), Option :: {isReadOnly, boolean()}.

Sets the cell as read-only.

setRenderer(This, Renderer) -> ok

Sets the renderer to be used for cells with this attribute.

Takes ownership of the pointer.

setTextColour(This :: wxGridCellAttr(), ColText :: wx:wx_colour()) -> ok

Sets the text colour.