add maxline restriction in single line mode textCtrl. let textctrl will fire wxEVT_TEXT_MAXLEN and not recive the chars when the text length beyond the maxlength
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -110,6 +110,7 @@ public:
|
||||
virtual bool IsModified() const wxOVERRIDE;
|
||||
virtual bool IsEditable() const wxOVERRIDE;
|
||||
|
||||
virtual void SetMaxLength(unsigned long len) wxOVERRIDE;
|
||||
// If the return values from and to are the same, there is no selection.
|
||||
virtual void GetSelection(wxTextPos* from, wxTextPos* to) const wxOVERRIDE;
|
||||
|
||||
@@ -489,6 +490,11 @@ private:
|
||||
// last position (only used by GetLastPosition())
|
||||
wxTextPos m_posLast;
|
||||
|
||||
// max text line length
|
||||
long m_maxLength;
|
||||
// current text line length
|
||||
long m_textLength;
|
||||
|
||||
// selection
|
||||
wxTextPos m_selAnchor,
|
||||
m_selStart,
|
||||
|
Reference in New Issue
Block a user