]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/textctrl.cpp
Fixed my sloppy fix for redundant path separators
[wxWidgets.git] / src / os2 / textctrl.cpp
index c663907618a8ff7f78d32c31b1920555132665f0..f375a3888662a05ae03507ebf7dc37eaf327b822 100644 (file)
@@ -385,6 +385,14 @@ void wxTextCtrl::Clear()
     ::WinSetWindowText(GetHwnd(), "");
 } // end of wxTextCtrl::Clear
 
+bool wxTextCtrl::EmulateKeyPress(
+  const wxKeyEvent&                 rEvent
+)
+{
+    SetFocus();
+    return(wxTextCtrlBase::EmulateKeyPress(rEvent));
+} // end of wxTextCtrl::EmulateKeyPress
+
 // ----------------------------------------------------------------------------
 // Clipboard operations
 // ----------------------------------------------------------------------------
@@ -1058,6 +1066,15 @@ void wxTextCtrl::OnChar(
     rEvent.Skip();
 } // end of wxTextCtrl::OnChar
 
+void wxTextCtrl::SetFocus()
+{
+    wxTextCtrlBase::SetFocus();
+    if ( !HasFlag(wxTE_MULTILINE) )
+    {
+        SetSelection(-1, -1);
+    }
+} // end of wxTextCtrl::SetFocus
+
 bool wxTextCtrl::OS2Command(
   WXUINT                            uParam
 , WXWORD                            WXUNUSED(vId)