How to change the caption size of C1RibbonForm

Posted by: jerhardt on 29 September 2021, 11:20 pm EST

  • Posted 29 September 2021, 11:20 pm EST

    Hi,

    at the moment we’re updating our application from the old legacy C1Ribbon to the new one. The application is a MDI form. For the MDI children we’ve used the C1RibbonForm as a base class instead of a normal Windows Form, even if they don’t have a Ribbon itself, because the C1RibbonForm was themed when we’ve set the VisualStyle. This also works with the new Themes, but the caption bar of the new C1RibbonForm is higher than before (about 8px). This huge caption bar looks weird at the MDI children and also the icon of the children are streched and get blurred.

    I’ve managed to reduce the caption bar height of the MDI parent form with

    ribbon.RibbonStyle.ConstSet(StyleConst.FormTitleHeight) = ribbon.RibbonStyle.ConstSet(StyleConst.FormTitleHeight) - 8
    

    but setting the RibbonStyle of the C1RibbonForm accordingly has no effect on the MDI children.

    How can I reduce the size of the caption bar of the MDI children?

    An alternative solution would be that a theme can also modify the color of the caption bar of a normal Windows Form, but I’ve found no way to do so.

    Any help would be appreciated, because this is right now a show stopper for the upgrade.

    Best regards,

    Juergen

  • Posted 30 September 2021, 4:04 pm EST

    Hi,

    The extra caption height seems to be caused by the border shown for the MDI child C1RibbonForm. This issue has been reported to the development team and the ETA for the fix is 21v3 release. A new property MdiChildBorder will be introduced so that you can set the width of the border shown when the C1RibbonForm is an MDI child.

    We do not have an ETA for the 21v3 release yet. We will let you know as soon as we have an update.

    In the meantime, you can use the attached workaround that changes the height of the title bar and also adjusts the icon and buttons. Since the RibbonStyle is shared among the instances of RibbonForm, you need to only set it once.

    [Internal Tracking ID : C1WIN-25059]

    Regards

    Avnish

    Ribbon_MDICaption.zip

  • Posted 5 October 2021, 9:06 pm EST

    Hi,

    thanks a lot for the workaround! It works perfectly - at least until one applies a new theme to the application. But that’s ok for me if I get a final solution in the next release.

    Again, thanks for the quick response!

    Best regards,

    Juergen

  • Posted 25 April 2023, 7:54 pm EST

    Hi,

    Apologies for the delayed update. The issue had been fixed. Please update and let us know if you face any issues.

    Regards.

Need extra support?

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

Learn More

Forum Channels