Alignment problem in TabControl

A

Alex K.

Hi all

In a Visual Studio 2005 C# project, I have a simplest tabcontrol with two
tabpages. When I set tab control's Alignment property to Right, tab texts
(captions) disappear.
Does anybody know how to fix this?

I tried this on two computers, at work and at home, both with Windows XP
with latest service packs, and Framework 2.0 and 3.0 with latest SP.

Thank you
Alex
 
M

Mick Doherty

This is a Visual Styles issue. TabControl does not support Visual Styles for
alignments other than top.

You can use SetWindowTheme via Interop to disable Visual Styles for the
TabControl whilst keeping it enabled for other controls, or you can
ownerdraw the tabcontrol.

Alternatively, use a third party TabControl.

On my site you will find a two TabControls which correct this issue. The
first (TabControlEx) is a Framework 1.1 TabControl and the second
(TabControl) is a Framework 2.0 TabControl. The second doesn't have all the
features of TabControlEx, but it Implements Visual Styles much better.
http://www.dotnetrix.co.uk/controls.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