.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>CCellEditor</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.sheet.CCellEditor_inheritance.png" alt="Inheritance diagram of CCellEditor" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.sheet.CCellEditor.html" title="wx.lib.sheet.CCellEditor" alt="" coords="124,237,301,267"/> <area shape="rect" id="node4" href="wx.SharedClientDataContainer.html" title="wx.SharedClientDataContainer" alt="" coords="5,5,228,35"/> <area shape="rect" id="node5" href="wx.RefCounter.html" title="wx.RefCounter" alt="" coords="251,5,369,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.core.deprecated.<locals.DeprecatedClassProxy`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.sheet.CCellEditor.__init__`                                       Initialize self.  See help(type(self)) for accurate signature.
: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)

      Initialize self.  See help(type(self)) for accurate signature.


   .. 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.


