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
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.
HI Mike,
thanks for your help, but the problem with your solution is that I don't know what texts are schon in the captions in advance because I support multiple languages.
I would need to know if the text doesn't fit make itself wider not depending on sub-tabs.
Btw. It is not that unusual as you might think. Pls see screenshot from excel after adding a picture.