469,963 Members | 2,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

how to change tab page color

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).Ba ckColor = Color.Blue

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

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

ElseIf TabControl1.SelectedIndex = 1 Then

TabControl1.TabPages(TabControl1.SelectedIndex).Ba ckColor = Color.Blue

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

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

Else

TabControl1.TabPages(TabControl1.SelectedIndex).Ba ckColor = 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
Mar 6 '06 #1
1 2363
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.
jaffar wrote:
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).Ba ckColor = Color.Blue

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

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

ElseIf TabControl1.SelectedIndex = 1 Then

TabControl1.TabPages(TabControl1.SelectedIndex).Ba ckColor = Color.Blue

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

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

Else

TabControl1.TabPages(TabControl1.SelectedIndex).Ba ckColor = 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


Mar 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Irvin Amoraal | last post: by
4 posts views Thread by Richard Cornford | last post: by
7 posts views Thread by Cliff Cavin | last post: by
7 posts views Thread by Markus McGee | last post: by
3 posts views Thread by Ken McCrory | last post: by
4 posts views Thread by Shapper | last post: by
9 posts views Thread by ad | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.