]> git.saurik.com Git - wxWidgets.git/commitdiff
adding 'select all' semantics
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 31 Jul 2005 17:06:57 +0000 (17:06 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 31 Jul 2005 17:06:57 +0000 (17:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/textctrl.cpp

index 9e5abb25315cb1abe3d99f5caa3c59524d3ad85f..14e76f18f787382c2a23daab697536d131a884d8 100644 (file)
@@ -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<ControlEditTextSelectionRec>( 0 , kControlEditTextSelectionTag, &sel ) ;