Why won't Tabs in WindowsForms 2.0 render with XP style?

G

Guest

Supposedly the tab control in VS.NET 2005 can be rendered with the same style
as the menu and the toolbar. But when I put one on my form it shows up as the
old style.

Even happens after doing a call to: Application.EnableVisualStyles();

What's going on?
 
G

Gabriel Lozano-Morán

Does Application.RenderWithVisualStyles returns true or false?

Gabriel Lozano-Morán
 
G

Guest

It returns false when I have my theme set to Classic WIndows and true when I
set it to XP style. This makes me believe that in order for the tabs to
render with the visual style you have to have the XP Theme on, which is not
consistent with the visual rendering of the toolbars and menus in 2.0, which
appear the same regardless.
 
M

Mick Doherty

The TabControl is a standard Windows Control and it's appearance is
controlled by the System. A control will only draw with Visual Style if the
system is using Visual Styles. The ToolStrip and MenuStrip are brand new
controls and are not drawn by windows so it makes no difference whether or
not Visual Styles are applied to the system, they will always have the same
appearance.

You can create your own TabControl and have it appear as you want. It's a
lot of work but it can be done. See the TabControl tips on my site if you
would like to try.
http://www.dotnetrix.co.uk/tabcontrols.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top