Tab Control Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use tabs quite a bit in my application. I need to be able to highlight or
change the background color of not the tab sheet but the tab button or tab
buttons. Is there anyway to do this or is there a third party managed code
component with this feature.

Fred
 
Thanks for the reference. Thanks for the great reference. It gives code for
coloring the tab index for the selectedtab. My application uses several tabs
which may or may not have data depending on other things in the program. I
would like the ability to color all the nodes that have data programatically
and not by selection.
Can you provide a suggestion of how to use this referenced feature in that
manner.

Fred
 
Thanks for the great refernce. It works for the selected node. How do I
programatically turn on this color feature for one or more tabs using this
method.

Fred
 
There's one line in the code that checks whether the tab is the currently
selected tab or not based on which the tab is colored differently. Replace
that condition with your condition (existence of data).

So instead of:

If e.Index = Me.tabControl1.SelectedIndex Then
' paint differently..
Else
' remaining tabs..
End If

you would have:

If bDataExistsOnTab Then
' paint differently..
Else
' remaining tabs..
End If

hope that helps..
Imran.
 
I am confused. Say I have 5 tabs with 5 tab headers. Say I want to be able
to toggle any or all of the tab headers from gray to white and back again at
any time in my program operation. This TabContol_DrawItem does not seem to
be something that I can control.

Fred
 
Back
Top