]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/textctrl.cpp
corrected path splitting for mac relative paths
[wxWidgets.git] / src / os2 / textctrl.cpp
index 69f0914f4b5fb685130a2ab8502cd71ba5b36a1d..0c762e5d8e4e1d055e1c525338eb7b4456293157 100644 (file)
@@ -208,16 +208,12 @@ bool wxTextCtrl::Create(
     //
     // Set font, position, size and initial value
     //
     //
     // Set font, position, size and initial value
     //
-    wxFont&                         vFontParent = pParent->GetFont();
-
-    if (vFontParent.Ok())
-    {
-        SetFont(vFontParent);
-    }
-    else
-    {
-        SetFont(wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT));
-    }
+    wxFont*                          pTextFont = new wxFont( 10
+                                                            ,wxMODERN
+                                                            ,wxNORMAL
+                                                            ,wxNORMAL
+                                                           );
+    SetFont(*pTextFont);
     if (!rsValue.IsEmpty())
     {
         SetValue(rsValue);
     if (!rsValue.IsEmpty())
     {
         SetValue(rsValue);
@@ -324,7 +320,7 @@ void wxTextCtrl::WriteText(
   const wxString&                   rsValue
 )
 {
   const wxString&                   rsValue
 )
 {
-    ::WinSetWindowText(GetHwnd(), rsValue.c_str());
+    ::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM((PCHAR)rsValue.c_str()), MPARAM(0));
     AdjustSpaceLimit();
 } // end of wxTextCtrl::WriteText
 
     AdjustSpaceLimit();
 } // end of wxTextCtrl::WriteText
 
@@ -965,6 +961,13 @@ WXHBRUSH wxTextCtrl::OnCtlColor(
     return (WXHBRUSH)pBackgroundBrush->GetResourceHandle();
 } // end of wxTextCtrl::OnCtlColor
 
     return (WXHBRUSH)pBackgroundBrush->GetResourceHandle();
 } // end of wxTextCtrl::OnCtlColor
 
+bool wxTextCtrl::OS2ShouldPreProcessMessage(
+  WXMSG*                            pMsg
+)
+{
+    return wxControl::OS2ShouldPreProcessMessage(pMsg);
+} // end of wxTextCtrl::OS2ShouldPreProcessMessage
+
 void wxTextCtrl::OnChar(
   wxKeyEvent&                       rEvent
 )
 void wxTextCtrl::OnChar(
   wxKeyEvent&                       rEvent
 )
@@ -1128,7 +1131,7 @@ wxSize wxTextCtrl::DoGetBestSize() const
 
     if (m_windowStyle & wxTE_MULTILINE)
     {
 
     if (m_windowStyle & wxTE_MULTILINE)
     {
-        hText *= wxMin(GetNumberOfLines(), 5);
+        hText *= wxMax(GetNumberOfLines(), 5);
     }
     //else: for single line control everything is ok
     return wxSize(wText, hText);
     }
     //else: for single line control everything is ok
     return wxSize(wText, hText);