I have an UltraTabControl with the close button on the tab, and TabLayoutStyle set to SingleRowAutoSize. My problem is that the tabs are not auto sizing properly to allow for the close button, and the tab's text is being truncated. In the attached image, the tab show should read "ATS_DEV" with the close button after it. Instead it reads "ATS_D...". How can I get the autosize to take the close button into account? I am using the latest 8.3 hotfix.
Thanks,
Justin
I had a similar problem and I found that If I set the FixedWidth property of the tab to a really large number (I did 200) and then right after that call .ResetFixedWidth() on the tab, it would reset it to the right size.
This was ultimately determined to be not a bug. In the sample provided by JWJones, the Bold value was being set on an individual tab. However, tab metrics are not calculated with the Fonts on individual tabs for performance reasons. The tab metrics are measured with the Fonts on the Appearance, ActiveTabAppearance, and SelectedTabAppearance of the UltraTabControl and the widest calculated tab width is used. So you can prevent the ellipses from appearing by setting the Bold value on one of those three appearances.
Hi Matt,
Do you have any news regarding this problem? Using 9.2 I have the same problem as JWJones.
My guess is that it's not yet fixed, but could you suggest some workaround, other than using filters?
Thank you.
Justin,
I didn't have enough time to test the workaround thoroughly, but should you decide to play around further with it, I think that the problem is that you need to manually adjust the rects of any tab elements that are below the one you repositioned. You could keep track of the last bottom edge and set the next tab element's rect accordingly. I had thought of this when writing the creation filter, but it didn't manifest itself in my test.
-Matt
Matt,
Thanks for providing that workaround. I had to increase the extra buffer from 6 to 15 so that some of the longer tab captions would fit. It worked like a charm for fitting the text on the tab, but now the tabs are not spacing themselves properly on the tab strip. They are bunching together. I think I may just go with using a different font and removing the bold text property. I think this is the all around easiest workaround until the bug is fixed. Thank you for your efforts.
-Justin