wxWidgets: wxGridCellNumberEditor Class Reference

| Version: 3.0.2

- Main Page
- Related Pages
- Categories
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
wxGridCellNumberEditor Class Reference
Grid Related Classes

`#include <wx/grid.h>`

Inheritance diagram for wxGridCellNumberEditor:
[legend]

## Detailed Description

Grid cell editor for numeric integer data.

##

Library: wxAdvanced
Category: Grid Related Classes

See Also
  wxGridCellEditor, wxGridCellAutoWrapStringEditor, wxGridCellBoolEditor, wxGridCellChoiceEditor, wxGridCellEnumEditor, wxGridCellFloatEditor, wxGridCellTextEditor

## Public Member Functions
| wxGridCellNumberEditor (int min=-1, int max=-1)
| Allows you to specify the range for acceptable data.
virtual void | SetParameters (const wxString &params)
| Parameters string format is "min,max".
Public Member Functions inherited from wxGridCellTextEditor
| wxGridCellTextEditor (size_t maxChars=0)
| Text cell editor constructor.
virtual void | SetValidator (const wxValidator &validator)
| Set validator to validate user input.
Public Member Functions inherited from wxGridCellEditor
| wxGridCellEditor ()
| Default constructor.
virtual void | BeginEdit (int row, int col, wxGrid *grid)=0
| Fetch the value from the table and prepare the edit control to begin editing.
virtual wxGridCellEditor * | Clone () const =0
| Create a new object which is the copy of this one.
virtual void | Create (wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler)=0
| Creates the actual edit control.
virtual void | Destroy ()
| Final cleanup.
virtual bool | EndEdit (int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval)=0
| End editing the cell.
virtual void | ApplyEdit (int row, int col, wxGrid *grid)=0
| Effectively save the changes in the grid.
virtual void | HandleReturn (wxKeyEvent &event)
| Some types of controls on some platforms may need some help with the Return key.
bool | IsCreated ()
| Returns true if the edit control has been created.
virtual void | PaintBackground (wxDC &dc, const wxRect &rectCell, wxGridCellAttr &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.
virtual void | Reset ()=0
| Reset the value in the control back to its starting value.
virtual void | SetSize (const wxRect &rect)
| Size and position the edit control.
virtual void | Show (bool show, wxGridCellAttr *attr=NULL)
| Show or hide the edit control, use the specified attributes to set colours/fonts for it.
virtual void | StartingClick ()
| If the editor is enabled by clicking on the cell, this method will be called.
virtual void | StartingKey (wxKeyEvent &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.
virtual wxString | GetValue () const =0
| Returns the value currently in the editor control.
wxControl * | GetControl () const
| Get the wxControl used by this editor.
void | SetControl (wxControl *control)
| Set the wxControl that will be used by this cell editor for editing the value.
Public Member Functions inherited from wxClientDataContainer
| wxClientDataContainer ()
| Default constructor.
virtual | ~wxClientDataContainer ()
| Destructor.
void * | GetClientData () const
| Get the untyped client data.
wxClientData * | GetClientObject () const
| Get a pointer to the client data object.
void | SetClientData (void *data)
| Set the untyped client data.
void | SetClientObject (wxClientData *data)
| Set the client data object.
Public Member Functions inherited from wxRefCounter
| wxRefCounter ()
| Default constructor.
void | DecRef ()
| Decrements the reference count associated with this shared data and, if it reaches zero, destroys this instance of wxRefCounter releasing its memory.
int | GetRefCount () const
| Returns the reference count associated with this shared data.
void | IncRef ()
| Increments the reference count associated with this shared data.

## Protected Member Functions
bool | HasRange () const
| If the return value is true, the editor uses a wxSpinCtrl to get user input, otherwise it uses a wxTextCtrl.
wxString | GetString () const
| String representation of the value.

## Constructor & Destructor Documentation

wxGridCellNumberEditor::wxGridCellNumberEditor | ( | int | min = `-1`,
|  | int | max = `-1`
| ) |  |

Allows you to specify the range for acceptable data.

Values equal to -1 for both min and max indicate that no range checking should be done.

## Member Function Documentation

wxString wxGridCellNumberEditor::GetString | ( |  | ) | const
| protected

String representation of the value.

bool wxGridCellNumberEditor::HasRange | ( |  | ) | const
| protected

If the return value is true, the editor uses a wxSpinCtrl to get user input, otherwise it uses a wxTextCtrl.

virtual void wxGridCellNumberEditor::SetParameters | ( | const wxString & | params | ) |
| virtual

Parameters string format is "min,max".

Reimplemented from wxGridCellTextEditor.