Package wx :: Package lib :: Module sheet :: Class CCellEditor
[frames | no frames]

Type CCellEditor

    object --+            
             |            
GridCellWorker --+        
                 |        
    GridCellEditor --+    
                     |    
      PyGridCellEditor --+
                         |
                        CCellEditor


Custom cell editor


Method Summary
  __init__(self, grid)
  BeginEdit(self, row, col, grid)
Fetch the value from the table and prepare edit control to begin editing.
  Clone(self)
Create a new object which is the copy of this one.
  Create(self, parent, id, evtHandler)
Create the actual edit control.
  Destroy(self)
Final cleanup
  EndEdit(self, row, col, grid)
Commit editing the current cell.
  IsAcceptedKey(self, evt)
Return True to allow the given key to start editing.
  PaintBackground(self, rect, attr)
Draws the part of the cell not occupied by the edit control.
  Reset(self)
Reset the value in the control back to its starting value.
  SetSize(self, rect)
Position/size the edit control within the cell rectangle.
  Show(self, show, attr)
Show or hide the edit control.
  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.
  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.

Property Summary

Method Details

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.

Overrides:
wx.grid.GridCellEditor.BeginEdit

Clone(self)

Create a new object which is the copy of this one. Must Override.

Overrides:
wx.grid.GridCellEditor.Clone

Create(self, parent, id, evtHandler)

Create the actual edit control. Must derive from wxControl. Must Override

Overrides:
wx.grid.GridCellEditor.Create

Destroy(self)

Final cleanup

NOTE: There is no need to everride this if you don't need to do something out of the ordinary.

Overrides:
wx.grid.GridCellEditor.Destroy

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.

Overrides:
wx.grid.GridCellEditor.EndEdit

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.

Overrides:
wx.grid.GridCellEditor.IsAcceptedKey

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.

Overrides:
wx.grid.GridCellEditor.PaintBackground

Reset(self)

Reset the value in the control back to its starting value. Must Override.

Overrides:
wx.grid.GridCellEditor.Reset

SetSize(self, rect)

Position/size the edit control within the cell rectangle.

Overrides:
wx.grid.GridCellEditor.SetSize

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.

Overrides:
wx.grid.GridCellEditor.Show

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.

Overrides:
wx.grid.GridCellEditor.StartingClick

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.

Overrides:
wx.grid.GridCellEditor.StartingKey

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:28 2007 http://epydoc.sf.net