Hi K,
wow, I see your point.
I thought I had it fixed in my app too but my titles aren't disabled either.
You can do ownerdrawn fixed and change the color of the font easy enough.
Private Sub TabControl1_DrawItem(ByVal sender As Object, ByVal e As
System.Windows.Forms.DrawItemEventArgs) Handles TabControl1.DrawItem
Dim tp As TabPage
Dim layoutrct As New RectangleF(e.Bounds.Left, e.Bounds.Top,
e.Bounds.Width, e.Bounds.Height)
Dim sf As New StringFormat(StringFormatFlags.FitBlackBox)
sf.Alignment = StringAlignment.Center
sf.LineAlignment = StringAlignment.Center
tp = TabControl1.TabPages(e.Index)
If Not tp.Enabled Then
'for some reason not printing the 3-d part--tried to print twice
with offset but no luck
e.Graphics.DrawString(tp.Text, e.Font, SystemBrushes.ControlLight,
layoutrct)
layoutrct.Offset(2, 2)
e.Graphics.DrawString(tp.Text, e.Font, SystemBrushes.ControlDark,
layoutrct) 'SolidBrush(e.BackColor), layoutrct)
Else
e.Graphics.DrawString(tp.Text, e.Font,New SolidBrush(e.BackColor),
layoutrct)
End If
End Sub
This works if items are not enabled. But there must be an easier way--also
they shouldn't even be able to click on the tab.
I haven't found out how to avoid that.
this is a really big pain for something simple--but it seems that most of
the control included are lacking in very bacic features and require lots of
extra coding to just do standard things.
I hope you find an answer--I would also like to know.
Shane