]> git.saurik.com Git - wxWidgets.git/commitdiff
at the moment built in 'old' textcontrol has better overall appearance, added fix...
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 29 Apr 2004 11:33:29 +0000 (11:33 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 29 Apr 2004 11:33:29 +0000 (11:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/textctrl.cpp

index ed7226ccf8c13e6bb3a4e71e233ae1fa580d0591..b927bf2edb1192c0f0d910daece1d8ab0438affc 100644 (file)
@@ -62,7 +62,7 @@
 
 #define TE_UNLIMITED_LENGTH 0xFFFFFFFFUL
 #if TARGET_API_MAC_OSX
- #define wxMAC_USE_MLTE 1
+ #define wxMAC_USE_MLTE 0
  #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
  #define wxMAC_USE_MLTE_HIVIEW 1
  #else
@@ -1341,10 +1341,19 @@ void wxTextCtrl::WriteText(const wxString& str)
 
     MacRedrawControl() ;
 #else
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
     wxMacCFStringHolder cf(st , m_font.GetEncoding() ) ;
     CFStringRef value = cf ;
     SetControlData(  (ControlRef) m_macControl , 0, kControlEditTextInsertCFStringRefTag, 
         sizeof(CFStringRef), &value );
+#else
+    wxString val = GetValue() ;
+    long start , end ;
+    GetSelection( &start , &end ) ;
+    val.Remove( start, end - start ) ;
+    val.insert( start , str ) ;
+    SetValue( val ) ;
+#endif    
 #endif
 }