Getting the "Final" Width of a Treeview

Discussion in 'ASP .Net Web Controls' started by John Ruiz, Dec 5, 2003.

  1. John Ruiz

    John Ruiz Guest

    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!
    ~John
    John Ruiz, Dec 5, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AndrewF
    Replies:
    1
    Views:
    738
    Bruce Barker
    Oct 10, 2005
  2. JFCM
    Replies:
    4
    Views:
    5,719
  3. Replies:
    5
    Views:
    499
    Chris Uppal
    Nov 17, 2006
  4. John Ruiz

    Getting the "Final" Width of a Treeview

    John Ruiz, Dec 1, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    115
    John Ruiz
    Dec 1, 2003
  5. CKKwan

    Final width of a table?

    CKKwan, Sep 3, 2008, in forum: Javascript
    Replies:
    5
    Views:
    68
Loading...

Share This Page