Add wxDataViewCtrl::ExpandChildren()
This convenient method allows to expand all children of the item recursively. This is directly supported by both native implementations, so it makes sense to have this in wxDataViewCtrl itself, even if it could be also (less efficiently) implemented in the user code.
This commit is contained in:
@@ -271,6 +271,19 @@ TEST_CASE_METHOD(SingleSelectDataViewCtrlTestCase,
|
||||
CHECK( !m_dvc->IsExpanded(m_grandchild) );
|
||||
#endif
|
||||
CHECK( !m_dvc->IsExpanded(m_child2) );
|
||||
|
||||
m_dvc->Collapse(m_root);
|
||||
CHECK( !m_dvc->IsExpanded(m_root) );
|
||||
|
||||
m_dvc->ExpandChildren(m_root);
|
||||
CHECK( m_dvc->IsExpanded(m_root) );
|
||||
CHECK( m_dvc->IsExpanded(m_child1) );
|
||||
|
||||
// Expanding an already expanded node must still expand all its children.
|
||||
m_dvc->Collapse(m_child1);
|
||||
CHECK( !m_dvc->IsExpanded(m_child1) );
|
||||
m_dvc->ExpandChildren(m_root);
|
||||
CHECK( m_dvc->IsExpanded(m_child1) );
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SingleSelectDataViewCtrlTestCase,
|
||||
|
Reference in New Issue
Block a user