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
sorry, forgot to give version: I'm using Telerik.WinControls.UI v 2014.1.402.40
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.
I hope this will be useful.
Regards,
Dimitar
Telerik
thanks a lot for your speedy and helpful response Dimitar,
it's greatly appreciated - the workaround works perfectly !
Kind regards
James
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.
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
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?
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.
Dimitar
Telerik