用户控制属性 [英] User Control Property
本文介绍了用户控制属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都知道如何...创建一个显示在
属性页面中的用户控件属性,并允许用户从一组值中选择一个值?
比如一个组合框?
Anyone know how to ... make a user control property that shows up in the
property pages and allows one to select a value from a set of values ?
like a combobox for example ?
推荐答案
你好大卫,
非常简单。只需将属性添加到您想要在属性中的属性
窗口。
< System.ComponentModel.Category(" MyApp")> _
" MyApp"你的申请名称可以吗?当您在分类视图中订购
属性时,它会显示出来。
Hello David,
Very simple. Just put attribute to the property you want to be in property
window.
<System.ComponentModel.Category("MyApp")> _
"MyApp" can your name of your application. It shows up when you order the
properties in categorized view.
任何人都知道如何...创建一个显示在
属性页面允许一个人从一组值中选择一个值
?
就像组合框一样?
Anyone know how to ... make a user control property that shows up in
the
property pages and allows one to select a value from a set of values
?
like a combobox for example ?
我不确定我明白了...这会让我列出一些东西我想要用户从属性窗口中选择吗?
" Hayato Iriumi" <喜***** @ hotmail.com>在消息中写道
news:17 ********************* @ news.microsoft.com ...
I''m not sure i understand ... will that allow me to make a list of stuff i
want the user to select from the property window ?
"Hayato Iriumi" <hi*****@hotmail.com> wrote in message
news:17*********************@news.microsoft.com...
大卫你好,
很简单。只需将属性放入您想要在属性窗口中的属性。
< System.ComponentModel.Category(" MyApp")> _
MyApp你的申请名称可以吗?当您在分类视图中订购
属性时,它会显示出来。
Hello David,
Very simple. Just put attribute to the property you want to be in property
window.
<System.ComponentModel.Category("MyApp")> _
"MyApp" can your name of your application. It shows up when you order the
properties in categorized view.
任何人都知道如何...创建一个用户控件属性显示在
中
属性页并允许一个人从一组值中选择一个值
?
例如像一个组合框?
Anyone know how to ... make a user control property that shows up in
the
property pages and allows one to select a value from a set of values
?
like a combobox for example ?
将属性的输入值声明为枚举值...
Public Enum People
Ann >
Bill
Carter
David
结束枚举
<可浏览(假)GT;公共财产UserName()As People
获取
返回m_userName
结束获取
设置(ByValue值为人物)
m_userName = value
结束集
结束物业
A
结束财产
David Gacek <所以***** @ hotmail.com>在消息中写道
news:ul ************** @ TK2MSFTNGP10.phx.gbl ...
Declare the input value of the property as an enumerated value...
Public Enum People
Ann
Bill
Carter
David
End Enum
<Browsable(False)> Public Property UserName() As People
Get
Return m_userName
End Get
Set(ByValue value as People)
m_userName = value
End Set
End Property
A
End Property
"David Gacek" <so*****@hotmail.com> wrote in message
news:ul**************@TK2MSFTNGP10.phx.gbl...
任何人都知道如何。 ..创建一个显示在
属性页面中的用户控件属性,并允许用户从一组值中选择一个值?
就像组合框一样?
Anyone know how to ... make a user control property that shows up in the
property pages and allows one to select a value from a set of values ?
like a combobox for example ?
这篇关于用户控制属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文