File: wx.lib.sheet.CCellEditor.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (170 lines) | stat: -rw-r--r-- 6,535 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.. 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

   <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>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.ClientDataContainer.html" title="wx.ClientDataContainer" alt="" coords="5,5,176,35"/> <area shape="rect" id="node5" href="wx.lib.sheet.CCellEditor.html" title="wx.lib.sheet.CCellEditor" alt="" coords="89,237,257,267"/> <area shape="rect" id="node4" href="wx.RefCounter.html" title="wx.RefCounter" alt="" coords="200,5,311,35"/> </map> 
   </p>

|


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