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:
@@ -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:
|
||||
|
||||
|
@@ -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}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user