MDI-Behaivor of Ribbon/Ribbonform

Posted by: c1 on 6 September 2018, 5:24 am EST

    • Post Options:
    • Link

    Posted 6 September 2018, 5:24 am EST

    Hello folks,

    i have a first time use of Ribbon and RibbonForm in my application.

    Now i have three problems which i can’t solve. Perhaps someone could help me.

    1. I combine a Ribbonform and a Ribbon (like one of the samples) and use the mainform as mdiContainer. If the MDIChild is maximized, the ribbon shows the three buttons for handling the child (close, minimize and resize). If i encapsulate the ribbon into a user-control this doesnt work. Otherwise i can’t inherit a own class from Ribbon because this class shows no designer. Is there any way to seperate the ribbon (and its eventhandling) from the ribbonform?

    2. Ribbonform has the property CaptionFont to set the font of the window title. If i use a big font the caption was’t shown correct. Is there any possibity to set the height of the caption area of a ribbonfrom?

    3. Is there an way to manipulate the font or the backgroundcolor of one RibbonButton or RibbonLabel?

    Thanks in advance for any help.

    Niels

  • Posted 10 September 2018, 4:30 am EST

    Hello Niels,

    1. What I could understand here is that a parent RibbonForm contains a UserControl. This UserControl has a ribbon in it. The issue is that the UserControl’s ribbon does not have ControlBox and hence, its size cannot be controlled.

      I have created a sample where this scenario is replicated. Please note that embedded controls are not normally resizable by the user. Anchor the user control in a way that it resizes along with the form it is on, changing the size of the embedded ribbon in the process.

      If this is not what you mean, kindly modify the attached sample and share it back so that the issue is replicated at my end as well. This way, I will be able to assist you better with your requirement.

    2. I could observe this issue and am discussing as to whether we can control the height of caption area. Will let you know once it is done. [Internal Tracking ID: 342324]

    3. C1Ribbon does not provide the feature to change the Backcolor and Forecolor properties of RibbonButton directly.

      However, you can implement this by Host Control feature of C1Ribbon using RibbonControlHost class.

      For example: You can add “Button” control using the RibbonControlHost element by defining a new class inheriting C1.Win.C1Ribbon.RibbonControlHost and access its Backcolor and Forecolor properties in that class.

    For more information, please refer to the following URL:

    http://help.grapecity.com/componentone/NetHelp/c1ribbon/webframe.html#embeddingatextboxina.html

    Best Regards,

    Esha

    prj_Ribbon.zip

  • Posted 10 September 2018, 7:00 am EST

    Hello Esha,

    thanks for your reply and your sample. Great service !!!

    1. I have modifed your project for a better discription of my goal. While i working on this topic last friday, i found a workaround (change the parent of the ribbon from usercontrol to form, see attachment). This works fine and solve my problem.

    2. You send me a message? or could i observe this ticket by myself?

    3. OK. I will look to this approch. Actually i work with this enable property or modify the icons.

    Once more: Many thanks for looking/reproduce/answering to my problem.

    Niels

    prj_Ribbon.zip

  • Posted 11 September 2018, 2:40 am EST

    Hi Niels,

    Thank you for the kind words.

    1. Thanks for sharing your sample. It will help other users facing similar issues.

    2. When I have any update on this, I will update this thread. You can check the same.

    3. With this approach, you will have an MS Button on the ribbon that can be manipulated as per your requirement. Let me know if you need further assistance.

    Best Regards,

    Esha

Need extra support?

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

Learn More

Forum Channels