wxRuby Documentation Home

# Wx::GridCellAttr

This class can be used to alter the cells’ appearance in
the grid by changing their colour/font/… from default. An object of this
class may be returned by GridTable::GetAttr().

## Derived from

No base class

## Methods

- GridCellAttr.new
- GridCellAttr#clone
- GridCellAttr#inc_ref
- GridCellAttr#dec_ref
- GridCellAttr#set_text_colour
- GridCellAttr#set_background_colour
- GridCellAttr#set_font
- GridCellAttr#set_alignment
- GridCellAttr#set_read_only
- GridCellAttr#set_renderer
- GridCellAttr#set_editor
- GridCellAttr#has_text_colour
- GridCellAttr#has_background_colour
- GridCellAttr#has_font
- GridCellAttr#has_alignment
- GridCellAttr#has_renderer
- GridCellAttr#has_editor
- GridCellAttr#get_text_colour
- GridCellAttr#get_background_colour
- GridCellAttr#get_font
- GridCellAttr#get_alignment
- GridCellAttr#get_renderer
- GridCellAttr#get_editor
- GridCellAttr#is_read_only
- GridCellAttr#set_def_attr

### GridCellAttr.new

GridCellAttr.new(%(arg-type)Colour% colText, Colour colBack, Font font, Integer hAlign, Integer vAlign)

Constructor specifying some of the often used attributes.

### GridCellAttr#clone

GridCellAttr clone()

Creates a new copy of this object.

### GridCellAttr#inc_ref

inc_ref()

This class is ref 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

### GridCellAttr#dec_ref

dec_ref()

### GridCellAttr#set_text_colour

set_text_colour(%(arg-type)Colour% colText)

Sets the text colour.

### GridCellAttr#set_background_colour

set_background_colour(%(arg-type)Colour% colBack)

Sets the background colour.

### GridCellAttr#set_font

set_font(%(arg-type)Font% font)

Sets the font.

### GridCellAttr#set_alignment

set_alignment(%(arg-type)Integer% hAlign, Integer vAlign)

Sets the alignment. hAlign can be one of `ALIGN_LEFT`,
`ALIGN_CENTRE` or `ALIGN_RIGHT` and vAlign can be one
of `ALIGN_TOP`, `ALIGN_CENTRE` or `ALIGN_BOTTOM`.

### GridCellAttr#set_read_only

set_read_only(%(arg-type)Boolean% isReadOnly = true)

### GridCellAttr#set_renderer

set_renderer(%(arg-type)GridCellRenderer% renderer)

takes ownership of the pointer

### GridCellAttr#set_editor

set_editor(%(arg-type)GridCellEditor% editor)

### GridCellAttr#has_text_colour

Boolean has_text_colour()

accessors

### GridCellAttr#has_background_colour

Boolean has_background_colour()

### GridCellAttr#has_font

Boolean has_font()

### GridCellAttr#has_alignment

Boolean has_alignment()

### GridCellAttr#has_renderer

Boolean has_renderer()

### GridCellAttr#has_editor

Boolean has_editor()

### GridCellAttr#get_text_colour

Colour get_text_colour()

### GridCellAttr#get_background_colour

Colour get_background_colour()

### GridCellAttr#get_font

Font get_font()

### GridCellAttr#get_alignment

get_alignment(%(arg-type)Integer% hAlign, Integer vAlign)

See set_alignment for the returned values.

### GridCellAttr#get_renderer

GridCellRenderer get_renderer(%(arg-type)Grid% grid, Integer row, Integer col)

### GridCellAttr#get_editor

GridCellEditor get_editor(%(arg-type)Grid% grid, Integer row, Integer col)

### GridCellAttr#is_read_only

Boolean is_read_only()

### GridCellAttr#set_def_attr

set_def_attr(%(arg-type)GridCellAttr% defAttr)

[This page automatically generated from the Textile source at 2023-06-09 00:45:32 +0000]