I have huge tree, about 1000 nodes, and when I use TreeView.ExpandAll method it scrolling all tree to the end not smoothly. How to make it scrolling smoothly or not scrolling at all (let remain in the beggining) ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
By using the BeginUpdate() and EndUpdate() methods of the TreeView control, you can suspend the drawing of the TreeView control while you add the nodes to the tree. The ExpandAll() method of the TreeView control seems to ignore that part when it comes to displaying the scrollbar portion of the control.
A simple work-around is to just expand the parent node before adding the node branch to the TreeView control while using those BeginUpdate() and EndUpdate() methods.
Example: