SetSelection(-1, -1) now selects the entire string as on wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-09-18 17:15:40 +00:00
parent 639cee3157
commit ad28a8de8b
2 changed files with 12 additions and 0 deletions

View File

@@ -928,6 +928,12 @@ void wxTextCtrl::SetSelection( long from, long to )
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (from == -1 && to == -1)
{
from = 0;
to = GetValue().Length();
}
#ifndef __WXGTK20__
if ( (m_windowStyle & wxTE_MULTILINE) &&
!GTK_TEXT(m_text)->line_start_cache )

View File

@@ -928,6 +928,12 @@ void wxTextCtrl::SetSelection( long from, long to )
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (from == -1 && to == -1)
{
from = 0;
to = GetValue().Length();
}
#ifndef __WXGTK20__
if ( (m_windowStyle & wxTE_MULTILINE) &&
!GTK_TEXT(m_text)->line_start_cache )