//////////////////////////////////////////////////////////////////////////////////
//
// Purpose : Collapse all item on tree
//
// Scope : Public
//
// Arguments : none
//
// Returns : none
//
// Modification Log
// ================
// NAME VER DATE DESCRIPTION
//------------------ -----------------------------------------------------------
// setiawanthea 1.0 01/03/2006 Initial version
//
//////////////////////////////////////////////////////////////////////////////////
//--------------------------------------Start of Code------------------------------//
TreeViewItem ltvi_root
TreeViewItem ltvi_NextTreeViewItem
TreeViewItem ltvi_CurrentTreeViewItem
long ll_root, ll_next
long ll_Current
//Get tree Root
ll_root = tv_1.FindItem( RootTreeItem!, 0)
tv_1.GetItem( ll_root, ltvi_root )
tv_1.SelectItem(ll_root)
//tv_1.CollapseItem( ll_current )
//MessageBox( "Root Item", ltvi_root.Label )
// Returns the next tree item in the same branch level
do
//Get current tree
ll_current = tv_1.FindItem( CurrentTreeItem!, 0 )
tv_1.CollapseItem( ll_current )
//Get current tree data information
tv_1.GetItem( ll_current, ltvi_CurrentTreeViewItem )
// MessageBox( "Current Tree Item", ltvi_CurrentTreeViewItem.Label )
//Get next tree
ll_next = tv_1.FindItem( NextTreeitem!, ll_current )
tv_1.GetItem( ll_next, ltvi_NextTreeViewItem )
//select and make it current
tv_1.SelectItem(ll_next)
// MessageBox( "Next Tree Item", ltvi_NextTreeViewItem.Label )
if ll_next <= 0 then exit loop while true //--------------------------------------End of Code------------------------------//
Thursday, May 10, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment