We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeNodeAdv width not adjusted with the style/ font

Thread ID:





96255 Sep 1,2010 07:42 AM UTC Sep 7,2010 09:24 AM UTC ASP.NET Web Forms (Classic) 2
Tags: Tools
Dop Sun
Asked On September 1, 2010 07:42 AM UTC


Have counter an issue with the TreeViewAdv.

Takes the sample codes from TreeViewAdv Styles installed along with the Syncfusion Studio (Windows Forms Sample Browser), it's good that the TreeNodeAdv can be styled.

But the issue is: if the new font requires more size than the default font of the control, the extra spaces are not counted while calculating the scroll bar etc.

Sample code:
Adding the following line in the sample
TreeNodeAdvStyleInfo panthers = this.treeViewAdv1.BaseStyles["Panthers"] as TreeNodeAdvStyleInfo;
// The following line is I added to ensure that the new font in style requires more space.
panthers.Font = new Font("Courier New", 8, FontStyle.Bold);

Then, run the sample, and select the node with the style, you will find that the bound is calculated based on the old font of the control, not the font in the style.

Also, if the node text is just longer enough to exceed the horizontal space of the tree view, then, the horizontal scroll bar not shown.

I believe it may be because the width is not calculated based on the default font only instead of the real font used in style.

In general, it may be required a feature to change the width of the TreeNodeAdv. Currently, only the height can be changed, and no way to change the width, it's wired.

Dop Sun

Dop Sun
Replied On September 2, 2010 03:46 AM UTC

Looks like I'm putting in the wrong queue.

I'm going to post a new one in the Essential Tools-Windows Forum instead here.

Lingaraj S [Syncfusion]
Replied On September 7, 2010 09:24 AM UTC

Hi Dop,

We have updated information in Tools.Windows forum and thank you for using Syncfusion prodcuts and your contribution with SyncfusionCommunity Forums.

Lingaraj S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon