Expanding a branch
Posted
by Zafir Anjum
on August 6th, 1998
// ExpandBranch - Expands a branch completely
// hti - Handle of the tree item to expand
void CTreeCtrlX::ExpandBranch( HTREEITEM hti )
{
if( ItemHasChildren( hti ) ){
Expand( hti, TVE_EXPAND );
hti = GetChildItem( hti );
do{
ExpandBranch( hti );
}while( (hti = GetNextSiblingItem( hti )) != NULL );
}
EnsureVisible( GetSelectedItem() );
}

Comments
How do I check if the branch is expanded?
Posted by Legacy on 06/19/2002 12:00amOriginally posted by: Todd
When I do drag and drop I want to redraw the items in another branch, the problem is that when I redraw the other branches they collapse. Is there a way to check if an item is expanded so I can expand the branches that the user had selected before the redraw?
ReplyFor the people who like recursion
Posted by Legacy on 02/25/2002 12:00amOriginally posted by: Amir Geva
ReplyExpanding/Collapsing with numeric pad
Posted by Legacy on 01/28/2000 12:00amOriginally posted by: Jean Claude DAUPHIN
It seems to be a Tree Ctrl UI standard feature:
Keyboard "*","+" on numeric pad allow to expand the branch
Replyunder the selected item.
Keyboard "-" on numeric pad allow to collapse the branch under the selected item.
Another way
Posted by Legacy on 07/24/1999 12:00amOriginally posted by: Ant Htoo Naing
ReplyHow about change like this?
Posted by Legacy on 07/10/1999 12:00amOriginally posted by: Eung-Yeon, Kim
ReplyMemory fault!!
Posted by Legacy on 06/08/1999 12:00amOriginally posted by: Seo-Wooseok
Reply