X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd639a4f271eff1da3928925d3c16cc3ca3b169f..83666e99093aa0b65c497f7e6c75d98a875667cc:/src/generic/datavgen.cpp diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 61a9457001..ed190733d2 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -153,6 +153,8 @@ public: virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL); virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + virtual bool AcceptsFocusFromKeyboard() const { return false; } protected: virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); @@ -2691,7 +2693,7 @@ int wxDataViewMainWindow::GetEndOfLastCol() const for (i = 0; i < GetOwner()->GetColumnCount(); i++) { const wxDataViewColumn *c = - wx_const_cast(wxDataViewCtrl*, GetOwner())->GetColumn( i ); + const_cast(GetOwner())->GetColumn( i ); if (!c->IsHidden()) width += c->GetWidth(); @@ -3630,7 +3632,7 @@ void wxDataViewMainWindow::DestroyTree() void wxDataViewMainWindow::OnChar( wxKeyEvent &event ) { - if ( HandleAsNavigationKey(event) ) + if ( GetParent()->HandleAsNavigationKey(event) ) return; // no item -> nothing to do @@ -4177,6 +4179,12 @@ void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) ) AdjustScrollbars(); } +void wxDataViewCtrl::SetFocus() +{ + if (m_clientArea) + m_clientArea->SetFocus(); +} + bool wxDataViewCtrl::AssociateModel( wxDataViewModel *model ) { if (!wxDataViewCtrlBase::AssociateModel( model ))