Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1350
ContextualTab Caption Width
posted

Hi all,

I have a contextual tab group called "Data Table" with a single sub-tab called "Setup".

The text of the tab-group gets truncated when the size of the sub-tab is small.

Please see scrennshot.

Can I somehow show the complete contextual-tab-group text even if the sub-tabs caption is small? I need to show the full group caption no matter what is in that group.

Regards

Michael

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Michael,

    It's pretty unusual to have a single tab in it's own group, I think - although I'm pretty sure Office does do this on occasion.

    There's no way to do that through the normal properties of the control. The tab is automatically sized by it's contents without regard to the ContextualTabGroup.

    I have attached a sample project here that works around the issue. Basically, what the sample does is it sets the caption of the RibbonTab to the same caption as the ContextualTabGroup. This works out so that the tab is the same width as the ContextualTabGroup.

    Of course, the problem with this is that the RibbonTab is now displaying the wrong text. So I used a CreationFilter to change the text on the UIElements - essentially changing it on the drawing level. So the RibbonTab in code still thinks it's caption is "Data Tables." But it only draws "Setup" on the screen.

    WindowsFormsApplication55.zip
Reply Children