Node text alignment issue in RadTreeView

8 posts, 1 answers
  1. James
    James avatar
    3 posts
    Member since:
    Jul 2015

    Posted 14 Oct 2015 Link to this post

    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

     

  2. James
    James avatar
    3 posts
    Member since:
    Jul 2015

    Posted 14 Oct 2015 in reply to James Link to this post

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

     

     

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 15 Oct 2015 Link to this post

    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
  5. James
    James avatar
    3 posts
    Member since:
    Jul 2015

    Posted 15 Oct 2015 in reply to Dimitar Link to this post

    thanks a lot for your speedy and helpful response Dimitar,

    it's greatly appreciated - the workaround works perfectly !

     

    Kind regards

    James 

     

     

  6. John
    John avatar
    5 posts
    Member since:
    Jun 2015

    Posted 19 Nov 2015 in reply to Dimitar Link to this post

    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.

  7. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 20 Nov 2015 Link to this post

    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
  8. John
    John avatar
    5 posts
    Member since:
    Jun 2015

    Posted 20 Nov 2015 in reply to Dimitar Link to this post

    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?

  9. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 23 Nov 2015 Link to this post

    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready