Connecting Tech Pros Worldwide Forums | Help | Site Map

Alignment problem in TabControl

=?Utf-8?B?QWxleCBLLg==?=
Guest
 
Posts: n/a
#1: Jan 27 '08
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


Mick Doherty
Guest
 
Posts: n/a
#2: Jan 27 '08

re: Alignment problem in TabControl


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

--
Mick Doherty
http://www.dotnetrix.co.uk/nothing.html


"Alex K." <AlexK@discussions.microsoft.comwrote in message
news:EA8AD042-280D-44EB-A574-DEEFBA22260B@microsoft.com...
Quote:
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
>

Closed Thread


Similar C# / C Sharp bytes