implemented, tested and documented wxTextCtrl::SetMaxLength()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-08-15 12:45:53 +00:00
parent 2cefcb34d2
commit d7eee191c5
13 changed files with 119 additions and 12 deletions

View File

@@ -826,6 +826,14 @@ void wxTextCtrl::DiscardEdits()
m_modified = FALSE;
}
void wxTextCtrl::SetMaxLength(unsigned long len)
{
if ( !HasFlag(wxTE_MULTILINE) )
{
gtk_entry_set_max_length(GTK_ENTRY(m_text), len);
}
}
void wxTextCtrl::SetSelection( long from, long to )
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );