Alignment problem in TabControl

  • Thread starter Thread starter Alex K.
  • Start date Start date
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
 
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
 
Back
Top