Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Title format from a TabPage in a TabControl

Posted on 2006-11-20
6
Medium Priority
?
1,702 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 70

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 70

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 70

Accepted Solution

by:
Éric Moreau earned 450 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

885 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