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:
@@ -928,6 +928,12 @@ void wxTextCtrl::SetSelection( long from, long to )
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
|
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
|
||||||
|
|
||||||
|
if (from == -1 && to == -1)
|
||||||
|
{
|
||||||
|
from = 0;
|
||||||
|
to = GetValue().Length();
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef __WXGTK20__
|
#ifndef __WXGTK20__
|
||||||
if ( (m_windowStyle & wxTE_MULTILINE) &&
|
if ( (m_windowStyle & wxTE_MULTILINE) &&
|
||||||
!GTK_TEXT(m_text)->line_start_cache )
|
!GTK_TEXT(m_text)->line_start_cache )
|
||||||
|
@@ -928,6 +928,12 @@ void wxTextCtrl::SetSelection( long from, long to )
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
|
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
|
||||||
|
|
||||||
|
if (from == -1 && to == -1)
|
||||||
|
{
|
||||||
|
from = 0;
|
||||||
|
to = GetValue().Length();
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef __WXGTK20__
|
#ifndef __WXGTK20__
|
||||||
if ( (m_windowStyle & wxTE_MULTILINE) &&
|
if ( (m_windowStyle & wxTE_MULTILINE) &&
|
||||||
!GTK_TEXT(m_text)->line_start_cache )
|
!GTK_TEXT(m_text)->line_start_cache )
|
||||||
|
Reference in New Issue
Block a user