Alignment problem in TabControl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QWxleCBLLg==?=

    #1

    Alignment problem in TabControl

    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

    #2
    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.
    Download custom Windows Forms controls and components for .NET applications. TabControlEx, MenuSkinner, and more.


    --
    Mick Doherty
    Dotnetrix offers Nothing. Standard and Premium versions available.



    "Alex K." <AlexK@discussi ons.microsoft.c omwrote in message
    news:EA8AD042-280D-44EB-A574-DEEFBA22260B@mi crosoft.com...
    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
    >

    Comment

    Working...