]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/textctrl.cpp
removed mentions of wxUSE_OWNER_DRAWN: unless I miss something, this doesn't make...
[wxWidgets.git] / 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 ;
 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 ) ;
     sel.selStart = from ;
     sel.selEnd = to ;
     SetData<ControlEditTextSelectionRec>( 0 , kControlEditTextSelectionTag, &sel ) ;