Getting the "Final" Width of a Treeview
I have a TreeView object in a User Control (.ascx). The nodes in this tree
are programmatically added when the control is first loaded.
When I load the control, the TreeView displays quite nicely and its width is
exactly the width that is required for the displayed tree. As I expand the
nodes on my TreeView, the width increases, making the TreeView - once
again - exactly the width that is required for the displayed tree.
Please, will someone suggest a way to program my pretty TreeView such that
when it loads for the first time, it automatically sets its width to the
maximum needed width of the possible tree? Of course, dynamically adding or
removing nodes could change this width, but knowing the maximum width of the
TreeView at the time it loads is all I need.
Thank you so much!
|All times are GMT. The time now is 04:35 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.