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
665
Tab header not autosized
posted

Hi,

I am creating three differen appearances which are assigned dynamically to the TabControl.Tabs[x] using

this.TabControl.Tabs[x].Appearance = myAppearance1;

This code is executed the first time in Form.OnLoad procedure.

This works so far. The assigned images, fonts etc. where displayed in the tabheader. But the Text is not displayed as you can see in the attached image. Except the text of the first tab which is not assigned an appearance. After having changed something on a tab there is some calculation and after that, the tab apperances are reassigned (maybe some prerequisites have changed). Then the text in the tabheader is displayed correctly.

Why not during the first time?

The following properties are set:

  • TabsPerRow = 10
  • TabLayoutStyle = MultiRowAutoSize

Any ideas?

Thanks a lot

Patrick

 

 

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello Patrick,

    I tried this and it seems to work fine for me. You could try setting the trimming of the text to none and see how it behaves. I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.

    TabsAppearance.zip
Children