This is a migrated thread and some comments may be shown as answers.

Node text alignment issue in RadTreeView

7 Answers 119 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 14 Oct 2015, 09:57 AM

Hi there,

I'm encountering a problem when using the RadTreeView control to display sibling nodes with different text lengths.

The text for the nodes is not being uniformly left aligned - even when I explicitly set this for each node using 

     fooNode.TextAlignment = ContentAlignment.MiddleLeft

Please see the attached image for an example of the issue - I've highlighted the affected nodes in orange.‚Äč

To set the control's font I'm using

    radTreeView.Font = new Font("Microsoft Sans Serif", 8.25F, GraphicsUnit.Point);

 

I'd be really grateful if anyone could please advise on how I could get my node text lining up perfectly ! 

thanks a lot 

James

 

7 Answers, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 14 Oct 2015, 10:06 AM

sorry, forgot to give version: I'm using Telerik.WinControls.UI v 2014.1.402.40

 

 

0
Accepted
Dimitar
Telerik team
answered on 15 Oct 2015, 06:00 AM
Hello James,

Thank you for writing.

This is a known issue which is already logged in our Feedback Portal. You can track the item for status changes and add your vote for it here.
 
A workaround is available in the issue description as well.

I hope this will be useful.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 15 Oct 2015, 08:15 AM

thanks a lot for your speedy and helpful response Dimitar,

it's greatly appreciated - the workaround works perfectly !

 

Kind regards

James 

 

 

0
John
Top achievements
Rank 1
answered on 19 Nov 2015, 08:59 PM

I have a similar issue where sibling text items are not aligning properly. The length of an item may trigger the problem, but if so, I cannot see a pattern and the problem occurs for items that are not excessively long, i.e., not close to wider than the width of the RadTreeView control.

I tried the workaround from the FeedBack Portal, but it did not help in my case. I was unable to find any other feedback items were pertinent.

I have attached an image that shows the issue. Most of the tree items have 4 characters of text, all uppercase, though some have mixed case and are a little longer.

I am using 2015.3.1104.40.

0
Dimitar
Telerik team
answered on 20 Nov 2015, 01:37 PM
Hello John,

Thank you for writing.

I have checked this with a couple of fonts and there is a 1-pixel difference at most. In this case, this depends on how the font is rendered by the engine. For example, I have checked this with the Times New Roman Font and the items are correctly aligned (see attached image).

If you have any questions, please do not hesitate to contact us.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 20 Nov 2015, 02:40 PM

I am seeing one- and two-pixel differences. I see differences even when the first letter is the same for two entries that are not aligned the same.

I am not sure I understand the overall meaning of your post.

1 - Is the misalignment something that Telerik considers a bug?

and / or

2 - Are you suggesting that I can avoid the problem by choosing another font family?

0
Dimitar
Telerik team
answered on 23 Nov 2015, 12:38 PM
Hi James,

Thank you for writing back.

I have tested this again, but there is no 2 pixels difference on my side (see attached image). This is why I want to kindly ask you to open a new support thread where you can attach you project. This will allow us to further investigate your case and determine if indeed there is a bug or this is caused by the font. 

Meanwhile, you can test this with different fonts and observe if the issue persists.

If you have any questions, please do not hesitate to contact us.
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Treeview
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Dimitar
Telerik team
John
Top achievements
Rank 1
Share this question
or