]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
use generic dialogs under Palm (generic.diff part of patch 1894861)
[wxWidgets.git] / src / generic / listctrl.cpp
index 46cf4f36387728d2c8ce9263b0edc120ea455288..f6bb4d3199b3cbb4437d2f6e0e9da9abe6975f70 100644 (file)
@@ -1569,6 +1569,9 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
         int xOld = x;
         x += width;
 
+        const int wText = width - 8;
+        wxDCClipper clipper(*dc, xOld, rect.y, wText, rect.height);
+
         if ( item->HasImage() )
         {
             int ix, iy;
@@ -1582,7 +1585,7 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
         }
 
         if ( item->HasText() )
-            DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, width - 8);
+            DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, wText);
     }
 }
 
@@ -2161,7 +2164,7 @@ void wxListTextCtrlWrapper::Finish( bool setfocus )
     wxPendingDelete.Append( this );
     
     if (setfocus)
-        m_owner->SetFocus();
+        m_owner->SetFocusIgnoringChildren();
 }
 
 bool wxListTextCtrlWrapper::AcceptChanges()
@@ -3456,16 +3459,8 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
     ke.SetEventObject( parent );
     if (parent->GetEventHandler()->ProcessEvent( ke )) return;
 
-    if (event.GetKeyCode() == WXK_TAB)
-    {
-        wxNavigationKeyEvent nevent;
-        nevent.SetWindowChange( event.ControlDown() );
-        nevent.SetDirection( !event.ShiftDown() );
-        nevent.SetEventObject( GetParent()->GetParent() );
-        nevent.SetCurrentFocus( m_parent );
-        if (GetParent()->GetParent()->GetEventHandler()->ProcessEvent( nevent ))
-            return;
-    }
+    if ( HandleAsNavigationKey(event) )
+        return;
 
     // no item -> nothing to do
     if (!HasCurrent())