]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
added wxSYS_COLOUR_LISTBOX ; check to prevent wxSYS_COLOUR_HIGHLIGHT and HIGHLIGHT_TE...
[wxWidgets.git] / src / generic / listctrl.cpp
index cb0696824c6e0b8e86acb4bb1ab33ceaa34ce309..e05166317813a0df95bb3baf1b53d28a2b578332 100644 (file)
@@ -1060,24 +1060,33 @@ void wxListTextCtrl::OnChar( wxKeyEvent &event )
     {
         (*m_accept) = TRUE;
         (*m_res) = GetValue();
-        m_owner->SetFocus();
+        
+        if (!wxPendingDelete.Member(this))
+            wxPendingDelete.Append(this);
+
+        if ((*m_accept) && ((*m_res) != m_startValue))
+            m_owner->OnRenameAccept();
+            
         return;
     }
     if (event.m_keyCode == WXK_ESCAPE)
     {
         (*m_accept) = FALSE;
         (*m_res) = "";
-        m_owner->SetFocus();
+        
+        if (!wxPendingDelete.Member(this))
+            wxPendingDelete.Append(this);
+            
         return;
     }
+    
     event.Skip();
 }
 
 void wxListTextCtrl::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
 {
-    if (wxPendingDelete.Member(this)) return;
-
-    wxPendingDelete.Append(this);
+    if (!wxPendingDelete.Member(this))
+        wxPendingDelete.Append(this);
 
     if ((*m_accept) && ((*m_res) != m_startValue))
         m_owner->OnRenameAccept();
@@ -1097,7 +1106,7 @@ BEGIN_EVENT_TABLE(wxListMainWindow,wxScrolledWindow)
   EVT_KEY_DOWN       (wxListMainWindow::OnKeyDown)
   EVT_SET_FOCUS      (wxListMainWindow::OnSetFocus)
   EVT_KILL_FOCUS     (wxListMainWindow::OnKillFocus)
-  EVT_SCROLLWIN                 (wxListMainWindow::OnScroll)
+  EVT_SCROLL                 (wxListMainWindow::OnScroll)
 END_EVENT_TABLE()
 
 wxListMainWindow::wxListMainWindow()