none
TabControl left or right -- text not visible

    Question

  • Hi,

    I create a new WindowForms app and drag a tabcontrol on it.
    It has (by default) two pages.
    When I set the Alignment to left (or right) the Text disappears and the Multiline property is set to true.

    The text is visible if I use Button or Flatbutton but not with normal.

    The positive - in .NET 1.1 new added pages "stacked" and now they are vertical one after another.

    But with the buttons and multiline it makes a big distance ("border") between the buttons and the pages.

    Is it possible to have the thing with a visible left text in Appearance Normal?

    Cheers Manfred
    Tuesday, May 10, 2005 1:30 PM

Answers

  • The TabControl with appearance set to normal and visual styles on for the system does not support alignments other than top.  This is an OS limitation in the WC_TABCONTROL window class that the TabControl wraps.

     - mike
    Tuesday, May 10, 2005 6:02 PM

All replies

  • Hi,

    I just tried it and got no problem...
    But the multiline is being set to true, but I think its the expected behavior...
    I really can't figure it out, could it be on your installation? Or have you tried changing the fonts maybe?





    cheers,


    Paul June A. Domag
    Tuesday, May 10, 2005 2:28 PM
  • Hi Paul,

    thanks for your answer.
    I use B2 on a german Winows XP Pro SP2.

    I create a new project - change nothing (!!) drag the thing on the form, swicht to left - and the text is gone.

    Cheers

    Manfred
    Tuesday, May 10, 2005 5:03 PM
  • The TabControl with appearance set to normal and visual styles on for the system does not support alignments other than top.  This is an OS limitation in the WC_TABCONTROL window class that the TabControl wraps.

     - mike
    Tuesday, May 10, 2005 6:02 PM
  • Hi Mark,

    but bottom works fine for me. And for paul also left (as he posted above).
    However I just found it by "mishitting" the combobox - what I needed was bottom Smile

    Thanks

    Manfred
    Tuesday, May 10, 2005 9:01 PM
  • Of course I not only showed the MS guys earlier in the beta how to overcome this problem, but sent them code so that rendering works top/bottom/left/right with visual styles, so this is simply a matter of appathy thinking that it's acceptable to release a control that doesn't work in 3 out of 4 cases....

    Something like the broken DateTimePicker and the combo box that doesn't allow ID/Name lists that aren't bound to data sources STILL even though we had it in VB6....

    *sigh*
    Thursday, May 12, 2005 7:29 PM
  • why does the bottom only place the tab at the bottom but do not display the tab as inversed tabs? i think it is not estetic since it seems that the page is bellow
    Friday, June 10, 2005 12:15 PM
  •  JohnGalt wrote:
    but sent them code so that rendering works top/bottom/left/right with visual styles

    Do You can send this code to me too?
    vlad(at)argoi(dot)net  (antispam)

    Thank You
    Thursday, June 16, 2005 3:02 PM
  • Hi,

    I am facing the same problem. The text disappears after the tabcontrol alignment is set to left. I am using MS Visual Studio 5.

    Any solution for this?

     

    Thanks,

    Jeevan

    Friday, January 26, 2007 9:08 PM
  • here is a link to get around this problem ,the result isnt always pretty but if its of use ....

     

    http://msdn2.microsoft.com/en-us/library/ms404305.aspx#Mtps_DropDownFilterText

     

     

     

    Wednesday, November 14, 2007 11:52 AM
  • TabControl with VisualStyles only supports Top Alignment. At other alignments the image used to draw the tab will not be rotated and, if vertical, the text will not be rotated.

     

    Without VisualStyles the text and tab will draw correctly regardless of alignment.

     

    This problem can be overcome through OwnerDraw, but the solution may be much more work than you are prepared to put in. You will find some very basic OwnerDraw examples on my site at http://www.dotnetrix.co.uk/tabcontrols.html as well as some more complex examples on codeproject (you'll find links to these on the page linked to above).

     

    I have created a subclass of TabControl which corrects these errors and also adds support for mnemonics and disabled tabs.

     

    On the webpage at the link below, you will find 2 tabcontrols. The first called TabControlEx is a Framework 1.1 control and has an issue that results in oversized Tabs (as does the standard TabControl when DrawMode is set to OwnerDrawFixed) but which will work just fine in Framework 2.0. The second is a much simpler version of the control written for Framework 2.0, which corrects the tab size as well as correcting Visual Styles for alignments other than top.

    These are both available from my site at http://www.dotnetrix.co.uk/controls.html and are free to use in any way you wish (commercially or not).
    Wednesday, November 14, 2007 5:51 PM
  • Hi

    I am using vb.net 2005 and I ran into the same problem described here, when I am using tabs.

    I am trying to align my tabs to the left and the text is gone. If I change the appearance to buttons then the text is back, but there is a big gap between the buttons and the pages.

    Please let me know if there is a way to get around this problem. JohnGalt, is the code that can fix this problem still available?

    Cheers
    Sasikasu

    Me
    .TabControl1.Alignment = System.Windows.Forms.TabAlignment.Left
    (The Text in the tabs is gone.)

    Me.TabControl1.Appearance = System.Windows.Forms.TabAppearance.Buttons
    (I can get the text back, but there is a big gap between the tabs and the pages)

    Thursday, September 10, 2009 8:29 PM