contents up previous next

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

include files

<wx/grid.h>

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.