## wxGridCellEditor

This class is responsible for providing and manipulating the in-place edit controls for the grid. Instances of wxGridCellEditor (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

wxGridCellWorker

See also

wxGridCellTextEditor, wxGridCellFloatEditor, wxGridCellBoolEditor, wxGridCellNumberEditor, wxGridCellChoiceEditor

Members

wxGridCellEditor::wxGridCellEditor
wxGridCellEditor::IsCreated
wxGridCellEditor::Create
wxGridCellEditor::SetSize
wxGridCellEditor::Show
wxGridCellEditor::PaintBackground
wxGridCellEditor::BeginEdit
wxGridCellEditor::EndEdit
wxGridCellEditor::Reset
wxGridCellEditor::StartingKey
wxGridCellEditor::StartingClick
wxGridCellEditor::HandleReturn
wxGridCellEditor::Destroy
wxGridCellEditor::Clone
wxGridCellEditor::~wxGridCellEditor

### wxGridCellEditor::wxGridCellEditor

wxGridCellEditor()

### wxGridCellEditor::IsCreated

bool IsCreated()

### wxGridCellEditor::Create

void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler)

Creates the actual edit control.

### wxGridCellEditor::SetSize

void SetSize(const wxRect& rect)

Size and position the edit control.

### wxGridCellEditor::Show

void Show(bool show, wxGridCellAttr* attr = NULL)

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

### wxGridCellEditor::PaintBackground

void PaintBackground(const wxRect& rectCell, wxGridCellAttr* 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.

### wxGridCellEditor::BeginEdit

void BeginEdit(int row, int col, wxGrid* grid)

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

### wxGridCellEditor::EndEdit

bool EndEdit(int row, int col, wxGrid* grid)

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

### wxGridCellEditor::Reset

void Reset()

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

### wxGridCellEditor::StartingKey

void StartingKey(wxKeyEvent& 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.

### wxGridCellEditor::StartingClick

void StartingClick()

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

### wxGridCellEditor::HandleReturn

void HandleReturn(wxKeyEvent& event)

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

### wxGridCellEditor::Destroy

void Destroy()

Final cleanup.

### wxGridCellEditor::Clone

wxGridCellEditor* Clone() const

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

### wxGridCellEditor::~wxGridCellEditor

~wxGridCellEditor()

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