Correct TAB handling for generic wxDataViewCtrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-10-21 19:10:25 +00:00
parent 62957e523c
commit 788432e343
2 changed files with 11 additions and 1 deletions

View File

@@ -445,6 +445,8 @@ public:
virtual void Expand( const wxDataViewItem & item );
virtual void Collapse( const wxDataViewItem & item );
virtual void SetFocus();
protected:
virtual int GetSelections( wxArrayInt & sel ) const;
virtual void SetSelections( const wxArrayInt & sel );

View File

@@ -154,6 +154,8 @@ public:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual bool AcceptsFocusFromKeyboard() const { return false; }
protected:
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
@@ -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 ))