TabPage text disapearing

D

Dennis C. Drumm

I have an odd occurrence taking place. This has been verified on two
different computers running Windows XP Pro, sp2 and Visual Studio 2005 Pro.

When I add TabControl to a Windows Form and change the Alignment property
from Top, to Left, the tab's test disappears and also does not show when the
application is run.

I have an older application developed in .NET Framework 1.1 that was
converted to 2.0 and while the tab's text does not display in the designer
for this either, it does show when the application is run.

I have tried several times to create a new Windows Form Applications and add
a tab control to test with the same result every time.

What am I missing here?

Thanks,

Dennis
 
K

Kevin Yu [MSFT]

Hi Dennis,

Based on my research, this is a known issue in VS.NET 2005. If you have
VisualStyles enabled and set the left or right alignment, the Text Control
will disappear. I'm sorry, but currently, there is no good workaround to
this issue. But since it doesn't affect at runtime, please ignore it at
design time. Sorry for the inconvenience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
D

Dennis C. Drumm

The problem is, I'm not seing the tab page text when the application is run
either!

Thats a problem! What do I do?

Thanks,

Dennis
 
D

Dennis C. Drumm

I am implimenting option 2 in the KB (using Visual Styles) but ran into one
problem. The text is being drawn horizantally while the tab is vertical for
left alignment.

My DrawItem event for the TabControl looks like this:

private void tabControlViews_DrawItem(object sender, DrawItemEventArgs e)

{

Font font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((byte)(0)));

SolidBrush brush = new SolidBrush(System.Drawing.SystemColors.ControlText);

Graphics g = e.Graphics;

Pen p = new Pen(Color.Blue);

g.DrawString("Transform", font, brush, tabControlViews.GetTabRect(0));

}

Can you give me a push in the right direction to finish this work around?

Thanks,

Dennis
 

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