Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
UltraTree autosize
posted

Hi all!

I posted my question in old topic, but there were no answer, so I decided to create a new one here.

As you write here:

http://blogs.infragistics.com/forums/p/19931/277893.aspx#277893

UltraTree does not provide any support for auto-sizing itself. So, I wanted to know is it still the same, or it already can be autosized using min and max size properties?

Thanks in advance!

Parents
  • 53790
    posted

    Hi Dmitriy,

    Our UltraTree does not have property "Autosize", but if you want to make auto resize of your UltraTree you could add for example this piece of code in the events:

     

     

     

     

    private void ultraTree1_AfterExpand(object sender, Infragistics.Win.UltraWinTree.NodeEventArgs e)

    {

    ultraTree1.Width = ultraTree1.Width + (e.TreeNode.TextWidth/2);

    }

     

     

     

    private void ultraTree1_AfterCollapse(object sender, Infragistics.Win.UltraWinTree.NodeEventArgs e)

     

     

    {

    ultraTree1.Width = ultraTree1.Width - (e.TreeNode.TextWidth/2);

    }

    Please if you have any questions do not hesitate to ask me

    Regards

Reply Children
No Data