Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Getting the "Final" Width of a Treeview

Thread Tools

Getting the "Final" Width of a Treeview

John Ruiz
Posts: n/a
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!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
JComboBox width, dropdown list width Xu Java 11 07-15-2005 11:54 PM
Getting the "Final" Width of a Treeview John Ruiz ASP .Net Web Controls 0 12-01-2003 10:33 PM
Table width and columns width kris HTML 11 11-18-2003 06:49 AM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM