From: Stefan Csomor Date: Sun, 31 Jul 2005 17:06:57 +0000 (+0000) Subject: adding 'select all' semantics X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1a535eb9eeb393ad154ec1accbd2ff19a9c42453 adding 'select all' semantics git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 9e5abb2531..14e76f18f7 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1389,6 +1389,11 @@ void wxMacUnicodeTextControl::GetSelection( long* from, long* to) const void wxMacUnicodeTextControl::SetSelection( long from , long to ) { ControlEditTextSelectionRec sel ; + if ((from == -1) && (to == -1)) + { + from = 0 ; + to = 32767 ; // sel has 16 bit signed values, max is 32767 + } sel.selStart = from ; sel.selEnd = to ; SetData( 0 , kControlEditTextSelectionTag, &sel ) ;