Solved

Title format from a TabPage in a TabControl

Posted on 2006-11-20
6
1,620 Views
Last Modified: 2009-07-29
How can I change dynamicly the title (color and make it bold) of a TabPage in a TabControl? Because I added the TabPages dynamicly, I want to do it by using the TabPageIndex.
0
Comment
Question by:ICSAutomation
  • 3
  • 3
6 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 17978253
Hi ICSAutomation,

see http://dotnetrix.co.uk/tabcontrols.html

Cheers!
0
 

Author Comment

by:ICSAutomation
ID: 17988650
Thank's so far.
I can change the Background of the tabpage, but the square, where the title is written, doesn't change the color. How can I also change the color of the square?
And how can I change the style of the title. I want to write it fat....
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 17988734
check these examples from the link above:
How to Change the colours of a Tabcontrols Header Item.
A Completely OwnerDraw TabControl.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:ICSAutomation
ID: 17994396
very well, the I could set the backgroundcolor.
But I couldn't see how to change the textstyle of the title. I want, that it appears fat.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 150 total points
ID: 17995195
You surely have overriden the DrawItem event. This is the place where you need to modify it.

Here is an example of something I did to bold the text of the selected tab:
If CBool(e.State And DrawItemState.Selected) Then
    Dim f As Font = New Font(e.Font, FontStyle.Bold)
    e.Graphics.DrawString(Me.TabPages(e.Index).Text, f, Brushes.Red, r2, sf)
Else
    e.Graphics.DrawString(Me.TabPages(e.Index).Text, e.Font, b, r2, sf)
End If
0
 

Author Comment

by:ICSAutomation
ID: 17995923
Thank's a lot!!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now