473,503 Members | 4,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2593
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9303
by: Irvin Amoraal | last post by:
I am new to javascript coding. I am using some javascript code to change an image on an html page. I would like the user to click on the image to bring them to another page. I need to change an...
5
4770
by: Glenn Mulno | last post by:
Hi, I am trying to create a report page for several teams. Each team runs the same reports but the reports use different values. For a while this was getting insane everytime I updated the...
4
2591
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an...
7
2745
by: Cliff Cavin | last post by:
How do I programatically change the background color of an aspx page in code? Is there something like Page.BgColor = "#FFFFFF" ? For that matter, how do I access any of the DOCUMENT...
1
1648
by: Greg | last post by:
In my ASP.NET application I have a button that when pressed, data needs to be saved based on what the user typed in. I have other controls on the same page that should be updated as a result of the...
7
1662
by: Markus McGee | last post by:
Hi all, I have a quick question...I believe. On my web page, call it page A, I have a drop downlist with runat server enabled. When the drop downlist change event occurs it repopulates a...
3
1597
by: Ken McCrory | last post by:
I have a web form page (.aspx) with 95 label controls that I now need to be text boxes. Is there an easy way to change those to what I want using something like a find and replace or am I stuck...
4
1984
by: Shapper | last post by:
Hello, I have this image in my HTML code: <img src="images/en-US/myImage.jpg" /> I want to change the URL using the value of a Session variable. <img src="images/ Session("culture") Value...
9
16260
by: ad | last post by:
Hi, How can I dynamically change the MasterPager of a web page?
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.