X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d8268a1d64de58aab194e4d8ae800c755990aad..3bf93e1e9ac6b61e5220967d2ada2d4faec4dd9c:/src/univ/textctrl.cpp?ds=sidebyside diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 8583562101..58c2b8be3e 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -669,14 +669,9 @@ bool wxTextCtrl::Create(wxWindow *parent, style |= wxALWAYS_SHOW_SB; } - // wxTE_WORDWRAP is 0 for now so we don't need the code below -#if 0 - if ( style & wxTE_WORDWRAP ) - { - // wrapping words means wrapping, hence no horz scrollbar - style &= ~wxHSCROLL; - } -#endif // 0 + // wrapping style: wxTE_DONTWRAP == wxHSCROLL so if it's _not_ given, + // we won't have horizontal scrollbar automatically, no need to do + // anything // TODO: support wxTE_NO_VSCROLL (?) @@ -821,7 +816,7 @@ wxString wxTextCtrl::GetValue() const void wxTextCtrl::Clear() { - SetValue(_T("")); + SetValue(wxEmptyString); } bool wxTextCtrl::ReplaceLine(wxTextCoord line, @@ -1249,7 +1244,7 @@ void wxTextCtrl::Remove(wxTextPos from, wxTextPos to) // if necessary OrderPositions(from, to); - Replace(from, to, _T("")); + Replace(from, to, wxEmptyString); } void wxTextCtrl::WriteText(const wxString& text) @@ -1651,7 +1646,7 @@ wxString wxTextCtrl::GetLineText(wxTextCoord line) const //this is called during DoGetBestSize if (line == 0 && GetLineCount() == 0) return wxEmptyString ; - wxCHECK_MSG( (size_t)line < GetLineCount(), _T(""), + wxCHECK_MSG( (size_t)line < GetLineCount(), wxEmptyString, _T("line index out of range") ); return GetLines()[line];