的TabControl [英] TabControl

查看:99
本文介绍了的TabControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以让TabPage区域的矩形区域只有一个

TabControl。


我正在尝试绘制我的标签页区域有一种颜色和tabPage标签在

a不同的颜色。


谢谢

VJ

解决方案

当然,假设您有一个名为TabPage1的标签页。以下代码将

绘制标签页的客户区红色:


Dim rect As Rectangle

Dim g As System.Drawing.Graphics


rect = TabPage1.ClientRectangle()

g = TabPage1.CreateGraphics()


g.FillRectangle(System.Drawing.Brushes.Red,rect)

--------------------

来自:VJ < vi ******** @ yahoo.com>
主题:TabControl
日期:2004年5月25日星期二16:20:04 -0500
行:10
X-Priority:3
X-MSMail-Priority:正常
X-Newsreader:Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE:由Microsoft MimeOLE制作V6.00.2800.1409
消息ID:< OP ************** @ TK2MSFTNGP09.phx.gbl>
新闻组:microsoft.public.dotnet.languages.vb
NNTP-Posting-Host:adsl-68-94-224-66.dsl.rcsntx.swbell.net 68.94.224.66
路径:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08 .phx.gbl!TK2MSFTNGP09

..phx.gblXref:cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:205362
X-Tomcat-NG:microsoft.public。 dotnet.languages.vb

有什么方法可以让TabPage区域的矩形区域只有一个
TabControl。

我在这里试图画画我的tabpage页面有一种颜色和tabPage标签
ina不同的颜色。

谢谢
VJ




那不起作用..它描绘整个区域,包括标签标题..我想要只需要页面区域来绘制红色......


我明白你说的是什么..我也看了客户说的帮助

矩形给出了页面区域的宽度,但是它没有用它画出整个

区域红色..是不是因为我还有代码来绘制

不同颜色的标签和属性DrawMode设置为OwnerDrawFixed?


VJ


" Francis Ingels [MSFT]" < ringels@subtract_this_field.microsoft.com>写在

消息新闻:6w ************* @ cpmsftngxa10.phx.gbl ...

当然,假设你有一个tabpage名为TabPage1。以下代码将仅绘制标签页的客户区红色:

Dim rect As Rectangle
Dim g As System.Drawing.Graphics
rect = TabPage1.ClientRectangle()
g = TabPage1.CreateGraphics()
g.FillRectangle(System.Drawing.Brushes.Red,rect)

- -------------------

From:"" VJ" < vi ******** @ yahoo.com>
主题:TabControl
日期:2004年5月25日星期二16:20:04 -0500
行:10
X-Priority:3
X-MSMail-Priority:正常
X-Newsreader:Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE:由Microsoft MimeOLE制作V6.00.2800.1409
消息ID:< OP ************** @ TK2MSFTNGP09.phx.gbl>
新闻组:microsoft.public.dotnet.languages.vb
NNTP-Posting-Host:adsl-68-94-224-66.dsl.rcsntx.swbell.net 68.94.224.66
路径:



cpmsftngxa10.phx.gbl! TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09 phx.gbl

Xref:cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:205362
X-Tomcat -NG:microsoft.public.dotnet.languages.vb

我有什么方法可以得到TabPage区域的矩形区域只有
aTabControl。

我正在尝试用

a中的一种颜色和tabPage选项卡


绘制我的tabpage区域不同的颜色。

VJ



Hi VJ,

我进来了,不知道问题但为什么不仅仅调整尺寸

的矩形?


Cor


Is there any way I can get the rectangle area of the TabPage area only of a
TabControl.

I am trying here to paint my tabpage area with one color and tabPage tabs in
a different color.

Thanks
VJ

解决方案

Sure, suppose you have a tabpage called TabPage1. The following code will
paint just the client area of the tab page red:

Dim rect As Rectangle
Dim g As System.Drawing.Graphics

rect = TabPage1.ClientRectangle()
g = TabPage1.CreateGraphics()

g.FillRectangle(System.Drawing.Brushes.Red, rect)
--------------------

From: "VJ" <vi********@yahoo.com>
Subject: TabControl
Date: Tue, 25 May 2004 16:20:04 -0500
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <OP**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: adsl-68-94-224-66.dsl.rcsntx.swbell.net 68.94.224.66
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09
..phx.gblXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:205362
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Is there any way I can get the rectangle area of the TabPage area only of a
TabControl.

I am trying here to paint my tabpage area with one color and tabPage tabs ina different color.

Thanks
VJ




That did not work.. it paints the entire area including the tab headers.. I
want just the page area to paint red...

I understand what you are saying.. I too read the help that says the client
rectangle gives the page area width, but unfournately it paints the entire
area red.. Is it because that I have also code to paint the tabs in
different color and the property DrawMode set to OwnerDrawFixed?

VJ

"Francis Ingels [MSFT]" <ringels@subtract_this_field.microsoft.com> wrote in
message news:6w*************@cpmsftngxa10.phx.gbl...

Sure, suppose you have a tabpage called TabPage1. The following code will
paint just the client area of the tab page red:

Dim rect As Rectangle
Dim g As System.Drawing.Graphics

rect = TabPage1.ClientRectangle()
g = TabPage1.CreateGraphics()

g.FillRectangle(System.Drawing.Brushes.Red, rect)
--------------------

From: "VJ" <vi********@yahoo.com>
Subject: TabControl
Date: Tue, 25 May 2004 16:20:04 -0500
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <OP**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: adsl-68-94-224-66.dsl.rcsntx.swbell.net 68.94.224.66
Path:


cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09 phx.gbl

Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:205362
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Is there any way I can get the rectangle area of the TabPage area only of aTabControl.

I am trying here to paint my tabpage area with one color and tabPage tabs


in

a different color.

Thanks
VJ



Hi VJ,

I come in, do not know the problem however why than not just adjust the size
of the rectangle?

Cor


这篇关于的TabControl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆