Fixed wxTextCtrl::SetMaxLength for rich edit controls

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@28565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-07-31 15:43:20 +00:00
parent 3a56289bb0
commit b1a14f6748
3 changed files with 7 additions and 1 deletions

View File

@@ -216,6 +216,7 @@ wxMSW:
- wxLongLong formatting with MinGW corrected
- wxFileDialog now returns correct filter index for multiple-file dialogs
- Fixed a bug in wxSpinCtrl::DoGetBestSize that would make wxSpinCtrl too tall
- Fixed wxTextCtrl::SetMaxLength for rich edit controls
wxGTK:

View File

@@ -846,7 +846,7 @@ already is filled up to the maximal length, a
(giving it the possibility to show an explanatory message, for example) and the
extra input is discarded.
Note that this function may only be used with single line text controls.
Note that under GTK+, this function may only be used with single line text controls.
\wxheading{Compatibility}

View File

@@ -1247,6 +1247,11 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
void wxTextCtrl::SetMaxLength(unsigned long len)
{
#if wxUSE_RICHEDIT
if (IsRich())
::SendMessage(GetHwnd(), EM_EXLIMITTEXT, 0, (LPARAM) (DWORD) len);
else
#endif
::SendMessage(GetHwnd(), EM_LIMITTEXT, len, 0);
}