Left or Right Tab Alignment missing text

G

Guest

I want to create tabs in the TabControl that are aligned on either the right
or left side, but no text shows when doing this. Is there an issue here or a
work around. Text for tabs on top or bottom are just fine. I'm using VS
2005.
 
L

Luke Zhang [MSFT]

Hello Steve,

To set Text property for the tabs in a tabcontrol, we can select the tab
page and specify its Text property in the Properties Window. Can this help
resolve the problem? ( If misunderstood the issue, please feel free to
correct me)

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

I understand how to set the location of the tabs. That is not the issue.
When I set the tabs to be either left or right the text on the tab does not
show. It only shows text on the tab if you select top or bottom. Is this a
bug?
 
M

Mick Doherty

When Visual Styles are enabled the text does not show. It is not classed as
a bug because the TabControl only supports Top Aligned Tabs when using
Visual Styles.

You can workaround this isue by drawing the tabs yourself. In VS2005 this is
not too difficult as VisualStyleRenderer will help you out.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.visualstyles.visualstylerenderer.aspx

You will need to Inherit from TabControl and set ControlStyles.UserPaint to
true in order to stop the control from painting it's default borders.
http://www.dotnetrix.co.uk/tabcontrols.html --> A Completely OwnerDraw
TabControl.

If you don't want the hassle of drawing the control youself, then you could
use TabControlEx instead. This control is written for Framework 1.1 but
works just fine with Framework 2.
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