FlexGrid in TreeView-Mode / Text-Align behaviour

Posted by: lars.dankenbrink on 28 December 2021, 5:31 am EST

  • Posted 28 December 2021, 5:31 am EST - Updated 3 October 2022, 10:46 pm EST

    Hello support-team,

    I noticed a problem in the FlexGrid control that does not allow to set the text-alignment when using VisualStyles Custom or System.

    Normally in the built-in Office-VisualStyles the column is left-aligned. However, as soon as the VisualStyle is set to Custom or System, only right-aligned is possible.

    Attached is a small example program for this.

    Kind regards

    Lars

    FlxGrdTest.zip

  • Posted 29 December 2021, 3:25 am EST

    Hi Lars,

    a workaround would be to set the TextAlign of the “Normal” style:

    
    Me.C1FlexGrid1.Styles.Normal.TextAlign = C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter
    
    

    Seems like a bug to me. Now it is up to the C1 support to comment on this.

    But I suggest not to use the VisualStyles. They were removed in the .NET 5 version of C1FlexGrid. The suggested replacement is “C1ThemeController”.

    Best regards

    Wolfgang

  • Posted 29 December 2021, 5:00 am EST

    Hi Wolfgang,

    thank you for your advice.

    You also answer another question for me, namely whether the VisualStyles will still exist in the future. We have currently replaced the Classic Ribbon with the new control and this question came up, because it doesn’t really fit together anymore.

    We have also played with the C1ThemeController and assigned different styles. In my opinion, however, none is really 100% successful. Therefore, for the time being, we stick with the normal and businesslike style of the new ribbon control, which feels like the best compromise between legible contrast and design.

    Many greetings

    Lars

  • Posted 29 December 2021, 5:35 am EST

    Hi Lars,

    We have escalated the issue to the development team and will let you know when we have an update.

    [Tracking ID: C1WIN-26444]

    We would also like to suggest you use C1Theme instead of VisualStyle as it has been removed starting from NET5. If you face any issues, just let us know.

    Regards

    Avnish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels