Allow associating a validator with wxGridCellTextEditor.
Add wxGridCellTextEditor::SetValidator() for finer control over text input in wxGrid. Closes #15176. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -75,9 +75,9 @@ public:
|
||||
|
||||
// parameters string format is "max_width"
|
||||
virtual void SetParameters(const wxString& params);
|
||||
virtual void SetValidator(const wxValidator& validator);
|
||||
|
||||
virtual wxGridCellEditor *Clone() const
|
||||
{ return new wxGridCellTextEditor(m_maxChars); }
|
||||
virtual wxGridCellEditor *Clone() const;
|
||||
|
||||
// added GetValue so we can get the value which is in the control
|
||||
virtual wxString GetValue() const;
|
||||
@@ -92,8 +92,9 @@ protected:
|
||||
void DoReset(const wxString& startValue);
|
||||
|
||||
private:
|
||||
size_t m_maxChars; // max number of chars allowed
|
||||
wxString m_value;
|
||||
size_t m_maxChars; // max number of chars allowed
|
||||
wxScopedPtr<wxValidator> m_validator;
|
||||
wxString m_value;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGridCellTextEditor);
|
||||
};
|
||||
|
Reference in New Issue
Block a user