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
Justin,
I was unable to reproduce this behavior using a TabOrientation of LeftTop, a Style of Excel, and a couple tabs. Are there any other properties that you have set? If you can reproduce this in a simple sample and attach it to your reply, I can take a look at it since you said that you already have the latest 8.3 hotfix.
-Matt
Matt,
Thanks for looking into this. It can be reproduced by setting the main form's Font to 'Verdana', and setting the UltraTabControl.Appearance.FontData.Bold to True. Attached is a small example.
-Justin
This definitely seems like a bug. I have forwarded this thread to Developer Support so that the issue can be resolved accordingly. In the meantime, you could certainly set the TabLayoutStyle to SingleRowFixed and set the TabSize property yourself, but this might not be a viable solution for you.
I don't mind setting the size myself as a workaround. Since I add all of my tabs programatically at run time, I need to find out the size of the UltraTab, and then add some constant to allow for the close button. I cannot find a size property for the individual UltraTabs. There's the FixedWidth property, but it defaults to 0, so that doesn't help me. Is there some way to access the UltraTab's size?
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.
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.
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.