wxRuby Documentation Home

# Wx::GridCellEditor

This class is responsible for providing and manipulating
the in-place edit controls for the grid. Instances of GridCellEditor
(actually, instances of derived classes since it is an abstract class) can be
associated with the cell attributes for individual cells, rows, columns, or
even for the entire grid.

## Derived from

GridCellWorker

## See also

GridCellTextEditor, GridCellFloatEditor, GridCellBoolEditor, GridCellNumberEditor, GridCellChoiceEditor

## Methods

- GridCellEditor.new
- GridCellEditor#is_created
- GridCellEditor#create
- GridCellEditor#set_size
- GridCellEditor#show
- GridCellEditor#paint_background
- GridCellEditor#begin_edit
- GridCellEditor#end_edit
- GridCellEditor#reset
- GridCellEditor#starting_key
- GridCellEditor#starting_click
- GridCellEditor#handle_return
- GridCellEditor#destroy
- GridCellEditor#clone

### GridCellEditor.new

### GridCellEditor#is_created

Boolean is_created()

### GridCellEditor#create

create(%(arg-type)Window% parent, Integer id, EvtHandler evtHandler)

Creates the actual edit control.

### GridCellEditor#set_size

set_size(%(arg-type)Rect% rect)

Size and position the edit control.

### GridCellEditor#show

show(%(arg-type)Boolean% show, GridCellAttr attr = nil)

Show or hide the edit control, use the specified attributes to set
colours/fonts for it.

### GridCellEditor#paint_background

paint_background(%(arg-type)Rect% rectCell, GridCellAttr attr)

Draws the part of the cell not occupied by the control: the base class
version just fills it with background colour from the attribute.

### GridCellEditor#begin_edit

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

Fetch the value from the table and prepare the edit control
to begin editing. Set the focus to the edit control.

### GridCellEditor#end_edit

Boolean end_edit(%(arg-type)Integer% row, Integer col, Grid grid)

Complete the editing of the current cell. Returns true if the value has
changed. If necessary, the control may be destroyed.

### GridCellEditor#reset

reset()

Reset the value in the control back to its starting value.

### GridCellEditor#starting_key

starting_key(%(arg-type)KeyEvent% event)

If the editor is enabled by pressing keys on the grid,
this will be called to let the editor do something about
that first key if desired.

### GridCellEditor#starting_click

starting_click()

If the editor is enabled by clicking on the cell, this method will be
called.

### GridCellEditor#handle_return

handle_return(%(arg-type)KeyEvent% event)

Some types of controls on some platforms may need some help
with the Return key.

### GridCellEditor#destroy

destroy()

Final cleanup.

### GridCellEditor#clone

GridCellEditor clone()

Create a new object which is the copy of this one.

destructor()

The dtor is private because only DecRef() can delete us.

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