How to set focus to newly added CTreeCtrl tree item?
-
Hi i have created CTreeCtrl tree view,this is having list of children (parent child relationship) like normal windows explorer tree view.if i add any new item into the any of root node it will add as a last item of that root node.my problem is once i add new item to the root node,how to set focus to the added item also how to make it visible. 1.parent is already expanded, add new item to the parent. 2.parent is in collapsed state, add new item to the parent. In 1st case i am not able to make visible to the newly added item... please help me... thanks
-
Hi i have created CTreeCtrl tree view,this is having list of children (parent child relationship) like normal windows explorer tree view.if i add any new item into the any of root node it will add as a last item of that root node.my problem is once i add new item to the root node,how to set focus to the added item also how to make it visible. 1.parent is already expanded, add new item to the parent. 2.parent is in collapsed state, add new item to the parent. In 1st case i am not able to make visible to the newly added item... please help me... thanks
-
I'm not sure offhand but I would expect that forcing a refresh of the
CTreeView
would get the item displayed.The best things in life are not things.
-
Hi i have created CTreeCtrl tree view,this is having list of children (parent child relationship) like normal windows explorer tree view.if i add any new item into the any of root node it will add as a last item of that root node.my problem is once i add new item to the root node,how to set focus to the added item also how to make it visible. 1.parent is already expanded, add new item to the parent. 2.parent is in collapsed state, add new item to the parent. In 1st case i am not able to make visible to the newly added item... please help me... thanks
-
yes.. EnsureVisible is working if parent node is in Collapsed state.that time if make if (hParent != NULL) m_TreeCtrl.Expand(hParent, TVE_EXPAND); // Ensure the item is visible. m_TreeCtrl.EnsureVisible(hmyItem); like this its working,in my case parent is already expanded, i want to make perticular item visible once i add.