By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Set color of TabControl Border

P: n/a
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 custom control that
inherit all information from TabPage, but how to access those properties,
not supported by standart interface???

Thank you
Nov 15 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

Hi Tamir,

Thanks for posting in this group.
What does your "access those properties,not supported by standart
interface" mean?
The TabControl in .Net exposes the owner-draw interface for you. You can
handle DrawItem event of TabControl.
Also, you can override certain protected methods of this control.
You can override the WndProc method of TabControl or TabPage, then you can
hook some messages of this control.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| Subject: Set color of TabControl Border
| Date: Thu, 13 Nov 2003 20:59:38 +0200
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OU**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 198.211.173.74
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:199101
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| 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 custom control
that
| inherit all information from TabPage, but how to access those properties,
| not supported by standart interface???
|
| Thank you
|
|
|

Nov 15 '05 #2

P: n/a
Have you good references for those methods/??
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:Jb**************@cpmsftngxa06.phx.gbl...

Hi Tamir,

Thanks for posting in this group.
What does your "access those properties,not supported by standart
interface" mean?
The TabControl in .Net exposes the owner-draw interface for you. You can
handle DrawItem event of TabControl.
Also, you can override certain protected methods of this control.
You can override the WndProc method of TabControl or TabPage, then you can
hook some messages of this control.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| Subject: Set color of TabControl Border
| Date: Thu, 13 Nov 2003 20:59:38 +0200
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OU**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 198.211.173.74
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:199101 | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| 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 custom control
that
| inherit all information from TabPage, but how to access those properties, | not supported by standart interface???
|
| Thank you
|
|
|

Nov 15 '05 #3

P: n/a

Hi Tamir,

I think MSDN provides you a quick start of the usage and reference of these
methods.
For example, you can find the tabcontrol's Drawitem event usage in:
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformstabcontrolclassdrawitemtopi c.asp

You also can learn how to hook the message of tabcontrol in:
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformscontrolclasswndproctopic.as p

There are also many samples in internet, you can search these keyword in
www.google.com.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| References: <OU**************@TK2MSFTNGP12.phx.gbl>
<Jb**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Set color of TabControl Border
| Date: Sun, 16 Nov 2003 17:05:22 +0200
| Lines: 57
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#j**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 213.8.78.114
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:199678
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Have you good references for those methods/??
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:Jb**************@cpmsftngxa06.phx.gbl...
| >
| > Hi Tamir,
| >
| > Thanks for posting in this group.
| > What does your "access those properties,not supported by standart
| > interface" mean?
| > The TabControl in .Net exposes the owner-draw interface for you. You can
| > handle DrawItem event of TabControl.
| > Also, you can override certain protected methods of this control.
| > You can override the WndProc method of TabControl or TabPage, then you
can
| > hook some messages of this control.
| >
| > Hope this helps,
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| > | Subject: Set color of TabControl Border
| > | Date: Thu, 13 Nov 2003 20:59:38 +0200
| > | Lines: 9
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <OU**************@TK2MSFTNGP12.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | NNTP-Posting-Host: 198.211.173.74
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:199101
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > |
| > | 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 custom
control
| > that
| > | inherit all information from TabPage, but how to access those
| properties,
| > | not supported by standart interface???
| > |
| > | Thank you
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #4

P: n/a
That's fine. I already saw it. However I need a way to change border color
of TabPage inside TabControl without using Windows XP additions (to make it
cross-windows) control...

Thankx

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:Ba**************@cpmsftngxa06.phx.gbl...

Hi Tamir,

I think MSDN provides you a quick start of the usage and reference of these methods.
For example, you can find the tabcontrol's Drawitem event usage in:
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemwindowsformstabcontrolclassdrawitemtopi c.asp

You also can learn how to hook the message of tabcontrol in:
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemwindowsformscontrolclasswndproctopic.as p

There are also many samples in internet, you can search these keyword in
www.google.com.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| References: <OU**************@TK2MSFTNGP12.phx.gbl>
<Jb**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Set color of TabControl Border
| Date: Sun, 16 Nov 2003 17:05:22 +0200
| Lines: 57
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#j**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 213.8.78.114
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0 8.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:199678 | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Have you good references for those methods/??
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:Jb**************@cpmsftngxa06.phx.gbl...
| >
| > Hi Tamir,
| >
| > Thanks for posting in this group.
| > What does your "access those properties,not supported by standart
| > interface" mean?
| > The TabControl in .Net exposes the owner-draw interface for you. You can | > handle DrawItem event of TabControl.
| > Also, you can override certain protected methods of this control.
| > You can override the WndProc method of TabControl or TabPage, then you
can
| > hook some messages of this control.
| >
| > Hope this helps,
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| > | Subject: Set color of TabControl Border
| > | Date: Thu, 13 Nov 2003 20:59:38 +0200
| > | Lines: 9
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <OU**************@TK2MSFTNGP12.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | NNTP-Posting-Host: 198.211.173.74
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:199101
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > |
| > | 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 custom
control
| > that
| > | inherit all information from TabPage, but how to access those
| properties,
| > | not supported by standart interface???
| > |
| > | Thank you
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #5

P: n/a

Hi Tamir,

For example, you can first get the rectangle of the tabpage, then draw the
frame to it.
private void tabControl1_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)
{
Graphics g = e.Graphics;
Pen p = new Pen(Color.Blue,4);
g.DrawRectangle(p,this.tabPage1.Bounds);
}

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| References: <OU**************@TK2MSFTNGP12.phx.gbl>
<Jb**************@cpmsftngxa06.phx.gbl>
<#j**************@TK2MSFTNGP12.phx.gbl>
<Ba**************@cpmsftngxa06.phx.gbl>
| Subject: Re: Set color of TabControl Border
| Date: Mon, 17 Nov 2003 13:12:01 +0200
| Lines: 124
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uv**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 198.211.173.74
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:199814
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| That's fine. I already saw it. However I need a way to change border color
| of TabPage inside TabControl without using Windows XP additions (to make
it
| cross-windows) control...
|
| Thankx
|
|
|
| ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| news:Ba**************@cpmsftngxa06.phx.gbl...
| >
| > Hi Tamir,
| >
| > I think MSDN provides you a quick start of the usage and reference of
| these
| > methods.
| > For example, you can find the tabcontrol's Drawitem event usage in:
| >
|
http://msdn.microsoft.com/library/de...us/cpref/html/
| > frlrfsystemwindowsformstabcontrolclassdrawitemtopi c.asp
| >
| > You also can learn how to hook the message of tabcontrol in:
| >
|
http://msdn.microsoft.com/library/de...us/cpref/html/
| > frlrfsystemwindowsformscontrolclasswndproctopic.as p
| >
| > There are also many samples in internet, you can search these keyword in
| > www.google.com.
| >
| > Hope this helps,
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| > | References: <OU**************@TK2MSFTNGP12.phx.gbl>
| > <Jb**************@cpmsftngxa06.phx.gbl>
| > | Subject: Re: Set color of TabControl Border
| > | Date: Sun, 16 Nov 2003 17:05:22 +0200
| > | Lines: 57
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#j**************@TK2MSFTNGP12.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | NNTP-Posting-Host: 213.8.78.114
| > | Path:
| >
|
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0
| > 8.phx.gbl!TK2MSFTNGP12.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:199678
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > |
| > | Have you good references for those methods/??
| > |
| > |
| > | ""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
| > | news:Jb**************@cpmsftngxa06.phx.gbl...
| > | >
| > | > Hi Tamir,
| > | >
| > | > Thanks for posting in this group.
| > | > What does your "access those properties,not supported by standart
| > | > interface" mean?
| > | > The TabControl in .Net exposes the owner-draw interface for you. You
| can
| > | > handle DrawItem event of TabControl.
| > | > Also, you can override certain protected methods of this control.
| > | > You can override the WndProc method of TabControl or TabPage, then
you
| > can
| > | > hook some messages of this control.
| > | >
| > | > Hope this helps,
| > | > Best regards,
| > | > Jeffrey Tan
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Tamir Khason" <ta**********@tcon-NOSPAM.co.il>
| > | > | Subject: Set color of TabControl Border
| > | > | Date: Thu, 13 Nov 2003 20:59:38 +0200
| > | > | Lines: 9
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <OU**************@TK2MSFTNGP12.phx.gbl>
| > | > | Newsgroups: microsoft.public.dotnet.languages.csharp
| > | > | NNTP-Posting-Host: 198.211.173.74
| > | > | Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| > | > | Xref: cpmsftngxa06.phx.gbl
| > | microsoft.public.dotnet.languages.csharp:199101
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| > | > |
| > | > | 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 custom
| > control
| > | > that
| > | > | inherit all information from TabPage, but how to access those
| > | properties,
| > | > | not supported by standart interface???
| > | > |
| > | > | Thank you
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.