how to chage back color for tab pages

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
 

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

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top