473,413 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

VB.net 2005 Tabcontrol

Hi All

Is there any way to change the colour of the Tabcontrol Tab header strip

I have found how to override the individual Tab header colours in the
drawitem event but the rest of the Tabcontrol's Tab header is the default
windows control colour

If the Tab headers don't fill the Tabcontrol header strip it looks tacky

Failing this can anybody recommend a 3rd party Tabcontrol with can be
customised better

Regards
Steve
Jun 27 '08 #1
4 2432
Hi Steve,

I searched the Internet and found a sample of a TabControl with owner-drawn
tabs. You may visit the following link for more information:

http://www.vb-helper.com/howto_net_ownerdraw_tab.html

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jun 27 '08 #2
Hi Linda

Thats not what I need

I need to change the colour of the Tabcontrol Tab bar, i.e the header where
all the Tabpage headers sit, not the Tabpages themselves

If you get a Tabcontrol and put 2 or 3 tabpages on it, the space after the
last Tabpage header is a default colour which I need to change

Regards
Steve

"Linda Liu[MSFT]" <v-****@online.microsoft.comwrote in message
news:hC**************@TK2MSFTNGHUB02.phx.gbl...
Hi Steve,

I searched the Internet and found a sample of a TabControl with
owner-drawn
tabs. You may visit the following link for more information:

http://www.vb-helper.com/howto_net_ownerdraw_tab.html

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


Jun 27 '08 #3
Hi Steve,

Thank you for your prompt reply!

To get what you want, you need to get the rectangle representing the
TabControl's header strip first and then create a GraphicsPath object. Add
the header strip rectangle and all the tab rectangles to the GraphicsPath
object. Then fill the GraphicsPath object with the color you want. By
default, the FillMode property of a GraphicsPath is Alternate, which means
the overlap is subtractive.

The following is a sample:
Private Sub TabControl1_DrawItem(ByVal sender As Object, ByVal e As
System.Windows.Forms.DrawItemEventArgs) Handles TabControl1.DrawItem
' rectange representing the TabControl's header strip
Dim header_rect As New Rectangle(TabControl1.ClientRectangle.X,
tab_rect.Y, TabControl1.ClientRectangle.Width, tab_rect.Height)

Dim path As New GraphicsPath()
path.AddRectangle(header_rect)
For i As Integer = 0 To TabControl1.TabCount - 1
path.AddRectangle(TabControl1.GetTabRect(i))
Next

e.Graphics.FillPath(Brushes.Yellow, path)
End Sub

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Jun 27 '08 #4
Try XTabControl produced by www.springsys.com


23***************@TK2MSFTNGP03.phx.gbl...
Hi All

Is there any way to change the colour of the Tabcontrol Tab header strip

I have found how to override the individual Tab header colours in the
drawitem event but the rest of the Tabcontrol's Tab header is the default
windows control colour

If the Tab headers don't fill the Tabcontrol header strip it looks tacky

Failing this can anybody recommend a 3rd party Tabcontrol with can be
customised better

Regards
Steve

Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tamir Khason | last post by:
How be able to manage more deeply UI of TabControl and TabPage For example - I want to manage border color, change color of TabPage reef, eliminate spaces from both sides of the reef, so I bould...
0
by: David Veeneman | last post by:
I've come across an odd bit of behavior on the VS 2005 TabControl, and I'm wondering if its a bug, or if I'm missing something. I have a TabControl with five tab pages. Each page has a...
7
by: Victor S. | last post by:
1. What is System.Windows.Forms.VisualStyles.TextMetricsCharacterSet good for? 2. Are the Indic scripts supported? Are all supported scripts fully supported? (for printing and fine measuring)...
7
by: AbsolutG | last post by:
I'm trying to use the new tabcontrol in VB.NET 2005. While in design mode, it looks fine, using the same XP theme as the one I have set in Windows. The problem is that as soon as I run the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.