********************** wx.grid.GridCellEditor ********************** Inheritance diagram for `wx.grid.GridCellEditor`: | .. inheritance-diagram:: wx.grid.GridCellEditor | Description =========== This class is responsible for providing and manipulating the in-place edit controls for the grid. Instances of `wx.grid.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. .. seealso:: `wx.grid.GridCellTextEditor `_, `wx.grid.GridCellFloatEditor `_, `wx.grid.GridCellBoolEditor `_, `wx.grid.GridCellNumberEditor `_, `wx.grid.GridCellChoiceEditor `_ Known Subclasses ^^^^^^^^^^^^^^^^ `wx.grid.GridCellAutoWrapStringEditor`, `wx.grid.GridCellBoolEditor `_, `wx.grid.GridCellChoiceEditor `_, `wx.grid.GridCellEnumEditor`, `wx.grid.GridCellFloatEditor `_, `wx.grid.GridCellNumberEditor `_, `wx.grid.GridCellTextEditor `_, `wx.grid.PyGridCellEditor `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `BeginEdit <#BeginEdit>`_ * `Clone <#Clone>`_ * `Create <#Create>`_ * `Destroy <#Destroy>`_ * `EndEdit <#EndEdit>`_ * `GetCellAttr <#GetCellAttr>`_ * `GetControl <#GetControl>`_ * `HandleReturn <#HandleReturn>`_ * `IsAcceptedKey <#IsAcceptedKey>`_ * `IsCreated <#IsCreated>`_ * `PaintBackground <#PaintBackground>`_ * `Reset <#Reset>`_ * `SetCellAttr <#SetCellAttr>`_ * `SetControl <#SetControl>`_ * `SetSize <#SetSize>`_ * `Show <#Show>`_ * `StartingClick <#StartingClick>`_ * `StartingKey <#StartingKey>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `CellAttr <#CellAttr>`_ * `Control <#Control>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() `No docstrings available for this method.` -------- .. method:: BeginEdit(row, col, grid) Fetch the value from the table and prepare the edit control to begin editing. Set the focus to the edit control. **Parameters:** * `row` (int) * `col` (int) * `grid` (`wx.grid.Grid `_) -------- .. method:: Clone() Create a new object which is the copy of this one. | **Returns:** `wx.grid.GridCellEditor `_ -------- .. method:: Create(parent, id, evtHandler) Creates the actual edit control. **Parameters:** * `parent` (`wx.Window <../Widgets/wx.Window.html>`_) * `id` (int) * `evtHandler` (`wx.EvtHandler <../Widgets/wx.EvtHandler.html>`_) -------- .. method:: Destroy() Final cleanup. -------- .. method:: EndEdit(row, col, grid) Complete the editing of the current cell. Returns ``True`` if the value has changed. If necessary, the control may be destroyed. **Parameters:** * `row` (int) * `col` (int) * `grid` (`wx.grid.Grid `_) | **Returns:** `bool` -------- .. method:: GetCellAttr() `No docstrings available for this method.` -------- .. method:: GetControl() `No docstrings available for this method.` -------- .. method:: HandleReturn(event) Some types of controls on some platforms may need some help with the ``Return`` key. **Parameters:** * `event` (`wx.KeyEvent <../Events/wx.KeyEvent.html>`_) -------- .. method:: IsAcceptedKey(event) | **Parameters:** * `event` (`wx.KeyEvent <../Events/wx.KeyEvent.html>`_) | **Returns:** `bool` -------- .. method:: IsCreated() | **Returns:** `bool` -------- .. method:: PaintBackground(rectCell, 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. **Parameters:** * `rectCell` (`wx.Rect <../Widgets/wx.Rect.html>`_) * `attr` (`wx.grid.GridCellAttr `_) -------- .. method:: Reset() Reset the value in the control back to its starting value. -------- .. method:: SetCellAttr(attr) | **Parameters:** * `attr` (`wx.grid.GridCellAttr `_) -------- .. method:: SetControl(control) | **Parameters:** * `control` (`wx.Control <../Widgets/wx.Control.html>`_) -------- .. method:: SetSize(rect) Size and position the edit control. **Parameters:** * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_) -------- .. method:: Show(show, attr=None) Show or hide the edit control, use the specified attributes to set colours/fonts for it. **Parameters:** * `show` (bool) * `attr` (`wx.grid.GridCellAttr `_) -------- .. method:: StartingClick() If the editor is enabled by clicking on the cell, this method will be called. -------- .. method:: StartingKey(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. **Parameters:** * `event` (`wx.KeyEvent <../Events/wx.KeyEvent.html>`_) -------- Properties ^^^^^^^^^^ .. attribute:: CellAttr See `GetCellAttr <#GetCellAttr>`_ and `SetCellAttr <#SetCellAttr>`_ .. attribute:: Control See `GetControl <#GetControl>`_ and `SetControl <#SetControl>`_