将自己的控件与VS Designer集成问题? [英] Integrating Own Control with VS Designer question?

查看:61
本文介绍了将自己的控件与VS Designer集成问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我有一个Control的属性(我正在制作一个按钮),这使得用户可以选择什么形状的按钮

应该有...圆形,方形,

三角形...


如何在设计器视图中(在属性窗口中)让用户拥有

a我打算添加到这个控件的形状列表,可以选择吗?


如果你创建一个布尔属性,designerview中的列表将自动

show" True,False"但是如何添加自己的值到那个列表......?


该属性现在是一个字符串..但用户不知道他必须

类型Round ;在那里......


让我觉得我需要创建自己的Type或者其他东西..是可能的,

怎么样?


Thanx

/ Lars

解决方案

添加可浏览属性

<可浏览(真)> _

公共财产MyProperty()As。 。 。


-


OHM(特里伯恩斯)

。 。 。单手人。 。

如果你需要我的电子邮件,请问我


当你不知道自己在做什么时,过得很快


" Lars Netzel"百分比抑制率stop_spam] @ host.topdomain>在消息中写道

新闻:Od ************** @ TK2MSFTNGP09.phx.gbl ...

嗨!
我有一个Control(我正在制作的按钮)的属性,使得用户可以选择按钮应具有的形状为
...圆形,方形,
三角形.. 。

如何在设计器视图中(在属性窗口中)让用户
有一个我打算添加到这个控件的形状列表,可供选择?

如果您创建一个布尔属性,则designerview中的列表将自动显示真,假和真,假。但是如何添加自己的值到那个列表......?

该属性现在是一个字符串..但用户不知道他有
来键入Round在那里...

让我觉得我需要创建自己的Type或者什么东西..是
可能,怎么样?

Thanx
/ Lars





....我可以填写物业可以列出的物品清单用我自己的价值设定为




/ Lars

" One Handed Man(OHM - Terry Burns)" ; < news.microsoft.com> skrev i

meddelandet新闻:%2 *************** @ tk2msftngp13.phx.gbl ...

添加可浏览属性

<可浏览(真)> _
Public Property MyProperty()As。 。 。

-

OHM(特里伯恩斯)
。 。 。单手人。 。
如果你需要我的电子邮件,请问我

当你不知道自己在做什么时,过得很快

Lars Netzel百分比抑制率stop_spam] @ host.topdomain>在消息中写道
新闻:Od ************** @ TK2MSFTNGP09.phx.gbl ...

嗨!
我有一个控件(我正在制作的按钮)的属性使得用户可以选择按钮应具有的形状...圆形,方形,
三角形... 。

如何在设计器视图中(在属性窗口中)使用户


我想要的形状列表添加到此控件,可供选择?

如果您创建一个布尔属性,则designerview中的列表将


自动

show" True,假"但是如何添加自己的值到那个列表......?

该属性现在是一个字符串..但用户不知道他



必须

type" Round"在那里......

让我觉得我需要创建自己的Type或者什么东西..是


可能,

怎么样? br />
Thanx
/ Lars




需要多一点工作,我不知道怎么做,我想你的谈话

关于你在列表框上看到的收藏类型属性等


-


OHM(特里伯恩斯)

。 。 。单手人。 。

如果你需要我的电子邮件,请问我


当你不知道自己在做什么时,过得很快


" Lars Netzel"百分比抑制率stop_spam] @ host.topdomain>在消息中写道

news:uy ************** @ TK2MSFTNGP11.phx.gbl ...


。 ..我可以用我自己的价值填写物业可以设置为
的物品的实际清单吗?

/ Lars

One Handed Man (OHM - Terry Burns) < news.microsoft.com> skrev i
meddelandet新闻:%2 *************** @ tk2msftngp13.phx.gbl ...

添加可浏览属性

< Browsable(True)> _
Public Property MyProperty()As。 。 。

-

OHM(特里伯恩斯)
。 。 。单手人。 。
如果你需要我的电子邮件,请问我

当你不知道自己在做什么时,过得很快

Lars Netzel百分比抑制率stop_spam] @ host.topdomain>在消息中写道
新闻:Od ************** @ TK2MSFTNGP09.phx.gbl ...

嗨!
我有一个Control的一个属性(我正在制作一个按钮)使


可能

供用户选择按钮应具有的形状... Round,
Square,Triangle ......

如何在设计器视图中(在属性窗口中)使用户


我打算添加到此控件的形状列表,可供选择?

如果创建一个布尔属性,则designerview中的列表将


自动

show" True,False"但是如何添加自己的值到那个列表......?

该属性现在是一个字符串..但用户不知道他


to

type" Round"在那里......

让我觉得我需要创建自己的Type或者什么东西..是


可能,

怎么样? br />
Thanx
/ Lars





Hi!
I have a property of a Control (a button I''m making) that makes it possible
for the user to choose what shape a button should have... Round, Square,
Triangle...

How do I in the designer view (in the properties window) make the user have
a list of the shapes I intend to add to this control, to choose from?

If you create a Boolean property the list in designerview will automatically
show "True, False" but how do I add my own "Values" to that list... ?

The property is a string right now.. but the user has no idea that he has to
type "Round" in there...

Makes me think I need to create my own Type or something.. is that possible,
how?

Thanx
/Lars

解决方案

Add the browseable attribute
<Browsable(True)> _
Public Property MyProperty() As . . .

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don''t know what you''re doing

"Lars Netzel" <[stop_spam]@host.topdomain> wrote in message
news:Od**************@TK2MSFTNGP09.phx.gbl...

Hi!
I have a property of a Control (a button I''m making) that makes it possible for the user to choose what shape a button should have... Round, Square,
Triangle...

How do I in the designer view (in the properties window) make the user have a list of the shapes I intend to add to this control, to choose from?

If you create a Boolean property the list in designerview will automatically show "True, False" but how do I add my own "Values" to that list... ?

The property is a string right now.. but the user has no idea that he has to type "Round" in there...

Makes me think I need to create my own Type or something.. is that possible, how?

Thanx
/Lars




....and I can fill the actuall list of items that the property can be set to
with my own values?

/Lars
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> skrev i
meddelandet news:%2***************@tk2msftngp13.phx.gbl...

Add the browseable attribute
<Browsable(True)> _
Public Property MyProperty() As . . .

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don''t know what you''re doing

"Lars Netzel" <[stop_spam]@host.topdomain> wrote in message
news:Od**************@TK2MSFTNGP09.phx.gbl...

Hi!
I have a property of a Control (a button I''m making) that makes it possible

for the user to choose what shape a button should have... Round, Square,
Triangle...

How do I in the designer view (in the properties window) make the user


have

a list of the shapes I intend to add to this control, to choose from?

If you create a Boolean property the list in designerview will


automatically

show "True, False" but how do I add my own "Values" to that list... ?

The property is a string right now.. but the user has no idea that he


has to

type "Round" in there...

Makes me think I need to create my own Type or something.. is that


possible,

how?

Thanx
/Lars




That takes a bit more work, Im not sure how to do this, I think your talking
about the Collection type property you see on list boxes etc

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don''t know what you''re doing

"Lars Netzel" <[stop_spam]@host.topdomain> wrote in message
news:uy**************@TK2MSFTNGP11.phx.gbl...


...and I can fill the actuall list of items that the property can be set to with my own values?

/Lars
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> skrev i
meddelandet news:%2***************@tk2msftngp13.phx.gbl...

Add the browseable attribute
<Browsable(True)> _
Public Property MyProperty() As . . .

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don''t know what you''re doing

"Lars Netzel" <[stop_spam]@host.topdomain> wrote in message
news:Od**************@TK2MSFTNGP09.phx.gbl...

Hi!
I have a property of a Control (a button I''m making) that makes it


possible

for the user to choose what shape a button should have... Round, Square, Triangle...

How do I in the designer view (in the properties window) make the user


have

a list of the shapes I intend to add to this control, to choose from?

If you create a Boolean property the list in designerview will


automatically

show "True, False" but how do I add my own "Values" to that list... ?

The property is a string right now.. but the user has no idea that he


has

to

type "Round" in there...

Makes me think I need to create my own Type or something.. is that


possible,

how?

Thanx
/Lars





这篇关于将自己的控件与VS Designer集成问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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