473,387 Members | 1,579 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,387 software developers and data experts.

tabpages

i can't change the color of caption of tabpages..
is there way to do that?
Nov 16 '05 #1
2 1237
Hi yener,
i can't change the color of caption of tabpages..
is there way to do that?


I'm afraid that its impossible to change color of
fonts or background.

There are hidden properties ForeColor & BackColor
but they doesn't work...

Marcin

Nov 16 '05 #2
i found a VB version here:

http://www.onteorasoftware.com/VBControls.aspx#AnsTQ1

csharp version:

//Dont forget to set tabControl's drawMode to ownerDrawFixed..
private void tabControl1_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)

{

Graphics g = e.Graphics ;

TabPage tp = tabControl1.TabPages[e.Index] ;
StringFormat sf = new StringFormat();

RectangleF r = new RectangleF(e.Bounds.X, e.Bounds.Y + 2, e.Bounds.Width,
e.Bounds.Height - 2);

sf.Alignment = StringAlignment.Center ;

string strTitle = tp.Text;

Brush br = new SolidBrush(Color.Red) ;

g.FillRectangle(br, e.Bounds);

g.DrawString(strTitle, tabControl1.Font, Brushes.White, r, sf) ;

}

thnx anyway..

"yener" <yy@ss.com> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
i can't change the color of caption of tabpages..
is there way to do that?

Nov 16 '05 #3

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

Similar topics

8
by: Alexia | last post by:
Hi, I wanted to know how i can make the title that is displayed in a tabpage bold when it is selected. I have 4 tabpages and i want the user to know more clearly which one is selected. I...
1
by: ChrisK | last post by:
Bonjour, Débutant en VB.Net, je me trouve devant un souci. Au taf, une solution d'appli par onglet a été retenue...et sur qui ça tombe...sur kiki ! Bref voici mon souci : J'ai une form...
0
by: Thanos | last post by:
Hi everybody. Excuse my english is not perfect. I would to hide TabPages but I have tried >> TabPage.hide() or >> TabPage.Visible = False but no luck. Maybe the current Tab control...
4
by: Peter Row | last post by:
Hi, I have created a UserControl which is subsequently hosted on a standard form. My control has a TabControl on it but it has no TabPages configured. At runtime I create X pages and put a...
1
by: Luc | last post by:
Hi, I have a TabControl and, at runtime, I need to add some tabpages. The problem is that each tabpage is similar to the others and contains several controls. If I do...
3
by: VJ | last post by:
Is there a way to Order Tabpages.. I tried to Use a Class that implements the IComparer and a Compare method as suggested in the MSDN article. "ArrayList.Sort()" and then use the instance of...
7
by: Richard | last post by:
I have a form with seven tapages. These span only one record with a large number of fields (textboxes). On Tabpage1 I display a number of read-only text boxes. This displays information about...
2
by: Kevin | last post by:
Although lots of people described how to workaround the lack of ability to hide and show tab pages on a tab control, I couldnt find a code example so I made one. Create a class that inherits from...
11
by: Pete Kane | last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would contain tab pages of my own classes, I know you can achieve this with...
7
by: davidpryce123 | last post by:
Dear Windows Form Designers I am developing an application that uses a TabControl with several Tabpages. On the different Tabpages I wish to allow users to have the access to the same...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.