Add wxTreeListCtrl::EnsureVisible().

Just forward this to the wxDataViewCtrl method with the same name.

Closes #16937.
This commit is contained in:
kkrev
2015-03-31 14:31:14 -04:00
committed by Vadim Zeitlin
parent 3e62d33935
commit 2349bce2c4
3 changed files with 16 additions and 0 deletions

View File

@@ -313,6 +313,7 @@ public:
void SelectAll(); void SelectAll();
void UnselectAll(); void UnselectAll();
void EnsureVisible(wxTreeListItem item);
// Checkbox handling // Checkbox handling
// ----------------- // -----------------

View File

@@ -710,6 +710,13 @@ public:
*/ */
void UnselectAll(); void UnselectAll();
/**
Call this to ensure that the given item is visible.
@since 3.1.0
*/
void EnsureVisible(wxTreeListItem item);
//@} //@}

View File

@@ -1400,6 +1400,14 @@ void wxTreeListCtrl::UnselectAll()
m_view->UnselectAll(); m_view->UnselectAll();
} }
void wxTreeListCtrl::EnsureVisible(wxTreeListItem item)
{
wxCHECK_RET( m_view, "Must create first" );
m_view->EnsureVisible(m_model->ToDVI(item));
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Checkbox handling // Checkbox handling
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------