#endif
};
-#define TE_UNLIMITED_LENGTH 0xFFFFFFFFUL
-
IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
m_editable = true ;
m_dirty = false;
- m_maxLength = TE_UNLIMITED_LENGTH ;
+ m_maxLength = 0;
m_privateContextMenu = NULL;
}
return ;
}
- // Check if we have reached the max # of chars, but still allow navigation and deletion
- if ( !IsMultiLine() && GetValue().Length() >= m_maxLength &&
+ // Check if we have reached the max # of chars (if it is set), but still
+ // allow navigation and deletion
+ if ( !IsMultiLine() && m_maxLength && GetValue().Length() >= m_maxLength &&
key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB &&
key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxPROCESS_ENTER) )
)
{
// eat it, we don't want to add more than allowed # of characters
+
+ // TODO: generate EVT_TEXT_MAXLEN()
return;
}