I have a tab control where I'm using user painting to remove flickering. It's rendering fine in terms of flicker removal, but the tab widths are not right. There is a large amount of padding around the text that gets bigger as the length of the text on the tab increases. It's like the width of the tab is based on a font that is larger than the one that is being drawn. I have tried changing the size of the font on the tab control, but that has no effect on the tab widths.
How does the tab control determine the widths of the tabs? Is there something I can override so that I can supply the tab widths to the tab control?