Connecting Tech Pros Worldwide Help | Site Map

Set color of TabControl Border

Tamir Khason
Guest
 
Posts: n/a
#1: Nov 15 '05
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


Jeffrey Tan[MSFT]
Guest
 
Posts: n/a
#2: Nov 15 '05

re: Set color of TabControl Border



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" <tamir-NOSPAM@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: <OUMlgihqDHA.2000@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
|
|
|

Tamir Khason
Guest
 
Posts: n/a
#3: Nov 15 '05

re: Set color of TabControl Border


Have you good references for those methods/??


""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message
news:JbiIvXlqDHA.2396@cpmsftngxa06.phx.gbl...[color=blue]
>
> 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" <tamir-NOSPAM@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: <OUMlgihqDHA.2000@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[/color]
microsoft.public.dotnet.languages.csharp:199101[color=blue]
> | 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[/color]
properties,[color=blue]
> | not supported by standart interface???
> |
> | Thank you
> |
> |
> |
>[/color]


Jeffrey Tan[MSFT]
Guest
 
Posts: n/a
#4: Nov 15 '05

re: Set color of TabControl Border



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" <tamir-NOSPAM@tcon-NOSPAM.co.il>
| References: <OUMlgihqDHA.2000@TK2MSFTNGP12.phx.gbl>
<JbiIvXlqDHA.2396@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: <#jnSpNFrDHA.2488@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-jetan@online.microsoft.com> wrote in message
| news:JbiIvXlqDHA.2396@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" <tamir-NOSPAM@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: <OUMlgihqDHA.2000@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
| > |
| > |
| > |
| >
|
|
|

Tamir Khason
Guest
 
Posts: n/a
#5: Nov 15 '05

re: Set color of TabControl Border


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-jetan@online.microsoft.com> wrote in message
news:BaHVZpKrDHA.1804@cpmsftngxa06.phx.gbl...[color=blue]
>
> Hi Tamir,
>
> I think MSDN provides you a quick start of the usage and reference of[/color]
these[color=blue]
> methods.
> For example, you can find the tabcontrol's Drawitem event usage in:
>[/color]
http://msdn.microsoft.com/library/de...us/cpref/html/[color=blue]
> frlrfsystemwindowsformstabcontrolclassdrawitemtopi c.asp
>
> You also can learn how to hook the message of tabcontrol in:
>[/color]
http://msdn.microsoft.com/library/de...us/cpref/html/[color=blue]
> 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" <tamir-NOSPAM@tcon-NOSPAM.co.il>
> | References: <OUMlgihqDHA.2000@TK2MSFTNGP12.phx.gbl>
> <JbiIvXlqDHA.2396@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: <#jnSpNFrDHA.2488@TK2MSFTNGP12.phx.gbl>
> | Newsgroups: microsoft.public.dotnet.languages.csharp
> | NNTP-Posting-Host: 213.8.78.114
> | Path:
>[/color]
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0[color=blue]
> 8.phx.gbl!TK2MSFTNGP12.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl[/color]
microsoft.public.dotnet.languages.csharp:199678[color=blue]
> | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
> |
> | Have you good references for those methods/??
> |
> |
> | ""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message
> | news:JbiIvXlqDHA.2396@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[/color]
can[color=blue]
> | > 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" <tamir-NOSPAM@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: <OUMlgihqDHA.2000@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[/color]
TabPage[color=blue]
> | > 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
> | > |
> | > |
> | > |
> | >
> |
> |
> |
>[/color]


Jeffrey Tan[MSFT]
Guest
 
Posts: n/a
#6: Nov 15 '05

re: Set color of TabControl Border



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" <tamir-NOSPAM@tcon-NOSPAM.co.il>
| References: <OUMlgihqDHA.2000@TK2MSFTNGP12.phx.gbl>
<JbiIvXlqDHA.2396@cpmsftngxa06.phx.gbl>
<#jnSpNFrDHA.2488@TK2MSFTNGP12.phx.gbl>
<BaHVZpKrDHA.1804@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: <uvNwFwPrDHA.1872@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-jetan@online.microsoft.com> wrote in message
| news:BaHVZpKrDHA.1804@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" <tamir-NOSPAM@tcon-NOSPAM.co.il>
| > | References: <OUMlgihqDHA.2000@TK2MSFTNGP12.phx.gbl>
| > <JbiIvXlqDHA.2396@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: <#jnSpNFrDHA.2488@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-jetan@online.microsoft.com> wrote in message
| > | news:JbiIvXlqDHA.2396@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" <tamir-NOSPAM@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: <OUMlgihqDHA.2000@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
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Closed Thread