how to change tab page color

J

jaffar

hi,

I am using Tab control, i added the tab pages , i want to change the tab
pages color when ever i select the tab page,
i have tabpage1,tabpage2,tabpage3
i mean when ever i select the tab page 2 the tabpage is hilighted remaing
two are not hilighted,

i want to change the tab page color in one color and remaing two are in
another color so that i can easyly identify that which tab page is selected
..

I tried it as
i wrote code in Tabcontrol1_selectedIndexchanged event(-,-)

Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged

If TabControl1.SelectedIndex = 0 Then

TabControl1.TabPages(TabControl1.SelectedIndex).BackColor = Color.Blue

TabControl1.TabPages(1).BackColor = Color.Cyan

TabControl1.TabPages(2).BackColor = Color.Cyan

ElseIf TabControl1.SelectedIndex = 1 Then

TabControl1.TabPages(TabControl1.SelectedIndex).BackColor = Color.Blue

TabControl1.TabPages(0).BackColor = Color.Cyan

TabControl1.TabPages(2).BackColor = Color.Cyan

Else

TabControl1.TabPages(TabControl1.SelectedIndex).BackColor = Color.Blue

TabControl1.TabPages(0).BackColor = Color.Cyan

TabControl1.TabPages(1).BackColor = Color.Cyan

End If

End Sub

But i got color only for the rectangle part, i did not get color for the
tab's where are the upper corner


can any body send the code for this



warm regards

shaik jaffar ali
 
S

swapprose

Hi

u get the color for that selected tab page only,b'coz u set the color
for the tabpage only.so u get like that only.
u mean rectangle part means that tab page of that control area right.
how can u get color out side of that tabpage of tabcontrol.
by seeing ur code n implemented ur code i understand like this.

Thanks.
 

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