.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.sheet
.. highlight:: python
.. _wx.lib.sheet.CCellEditor:
==========================================================================================================================================
|phoenix_title| **wx.lib.sheet.CCellEditor**
==========================================================================================================================================
Custom cell editor
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
CCellEditor:
|
|super_classes| Known Superclasses
==================================
:class:`wx.core.GridCellEditor`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.sheet.CCellEditor.__init__`
:meth:`~wx.lib.sheet.CCellEditor.BeginEdit` Fetch the value from the table and prepare edit control to begin editing.
:meth:`~wx.lib.sheet.CCellEditor.Clone` Create a new object which is the copy of this one. Must Override.
:meth:`~wx.lib.sheet.CCellEditor.Create` Create the actual edit control. Must derive from wxControl.
:meth:`~wx.lib.sheet.CCellEditor.Destroy` Final cleanup
:meth:`~wx.lib.sheet.CCellEditor.EndEdit` Commit editing the current cell. Returns ``True`` if the value has changed.
:meth:`~wx.lib.sheet.CCellEditor.IsAcceptedKey` Return ``True`` to allow the given key to start editing. The base class
:meth:`~wx.lib.sheet.CCellEditor.PaintBackground` Draws the part of the cell not occupied by the edit control. The
:meth:`~wx.lib.sheet.CCellEditor.Reset` Reset the value in the control back to its starting value. Must Override.
:meth:`~wx.lib.sheet.CCellEditor.SetSize` Position/size the edit control within the cell rectangle.
:meth:`~wx.lib.sheet.CCellEditor.Show` Show or hide the edit control. Use the attr (if not None)
:meth:`~wx.lib.sheet.CCellEditor.StartingClick` If the editor is enabled by clicking on the cell, this method will be
:meth:`~wx.lib.sheet.CCellEditor.StartingKey` If the editor is enabled by pressing keys on the grid, this will be
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: CCellEditor(wx.grid.PyGridCellEditor)
Custom cell editor
.. method:: __init__(self, grid)
.. method:: BeginEdit(self, row, col, grid)
Fetch the value from the table and prepare edit control to begin editing.
Set the focus to the edit control. Must Override.
.. method:: Clone(self)
Create a new object which is the copy of this one. Must Override.
.. method:: Create(self, parent, id, evtHandler)
Create the actual edit control. Must derive from wxControl.
Must Override
.. method:: Destroy(self)
Final cleanup
NOTE: There is no need to everride this if you don't need
to do something out of the ordinary.
.. method:: EndEdit(self, row, col, grid)
Commit editing the current cell. Returns ``True`` if the value has changed.
If necessary, the control may be destroyed. Must Override.
.. method:: IsAcceptedKey(self, evt)
Return ``True`` to allow the given key to start editing. The base class
version only checks that the event has no modifiers. F2 is special
and will always start the editor.
.. method:: PaintBackground(self, rect, attr)
Draws the part of the cell not occupied by the edit control. The
base class version just fills it with background colour from the
attribute.
NOTE: There is no need to everride this if you don't need
to do something out of the ordinary.
.. method:: Reset(self)
Reset the value in the control back to its starting value. Must Override.
.. method:: SetSize(self, rect)
Position/size the edit control within the cell rectangle.
.. method:: Show(self, show, attr)
Show or hide the edit control. Use the attr (if not None)
to set colors or fonts for the control.
NOTE: There is no need to everride this if you don't need
to do something out of the ordinary.
.. method:: StartingClick(self)
If the editor is enabled by clicking on the cell, this method will be
called to allow the editor to simulate the click on the control.
.. method:: StartingKey(self, evt)
If the editor is enabled by pressing keys on the grid, this will be
called to let the editor react to that first key.