如何在属性窗口中显示属性? [英] How can I make a property not show in the properties window?
问题描述
我做了一个UserControl,在使用它时必须将AutoScroll设置为true。
所以我在Load事件中将它设置为True。
但是,当控件
放在表单上时,属性仍显示在属性窗口中。
这令人困惑。
如何在属性窗口中显示该属性?
提前感谢任何有用的信息
I made a Usercontrol that must have AutoScroll set to true when it is used.
So I set it to True in the Load event.
However the property still shows in the properties window when the control
is placed on a form.
That''s confusing.
How can I make that property not show in the properties window?
Thanks in advance for any useful info
推荐答案
使用browsable属性。例如:
<可浏览(错误)> _
公共属性名称()为字符串
获取.. 。
套装......
结束物业
Ron
"只是我 < GR **** @ a-znet.com>在消息中写道
新闻:Oa ************** @ TK2MSFTNGP15.phx.gbl ...
Use the browsable attribute. For example:
<Browsable(False)>_
Public Property Name() as String
Get ...
Set...
End Property
Ron
" Just Me" <gr****@a-znet.com> wrote in message
news:Oa**************@TK2MSFTNGP15.phx.gbl...
我做了一个Usercontrol,当
使用时,必须将AutoScroll设置为true。所以我在Load事件中将它设置为True。
然而,当控件放在表单上时,属性仍显示在属性窗口中。
令人困惑。
如何让属性窗口中没有显示该属性?
提前感谢任何有用的信息
I made a Usercontrol that must have AutoScroll set to true when it is used. So I set it to True in the Load event.
However the property still shows in the properties window when the control
is placed on a form.
That''s confusing.
How can I make that property not show in the properties window?
Thanks in advance for any useful info
"只是我 < GR **** @ a-znet.com> schrieb:
" Just Me" <gr****@a-znet.com> schrieb:
我做了一个UserControl,在使用它时必须将AutoScroll设置为true。
所以我在Load事件中将它设置为True。
然而当控件放置在窗体上时,属性仍显示在属性窗口中。
[...]如何使属性窗口中不显示该属性?
I made a Usercontrol that must have AutoScroll set to true when it is used.
So I set it to True in the Load event.
However the property still shows in the properties window when the control
is placed on a form.
[...] How can I make that property not show in the properties window?
>
\\\
Imports System.ComponentModel
..
..
..
<可浏览(错误)> _
公共财产......
///
如果该属性也不应出现在文本编辑器中,请添加
''EditorBrowsable''属性也是。
-
MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://dotnet.mvps.org/dotnet/faqs/>
\\\
Imports System.ComponentModel
..
..
..
<Browsable(False)> _
Public Property...
///
If the property should not appear in the text editor too, add the
''EditorBrowsable'' attribute too.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
我错过了什么吗?
我在哪里放置<可浏览(错误)>
AutoScroll属性附带UserControl。
我没有生成它。
谢谢
BTW将<可浏览(错误)> ;让设计者不要为
属性赋值< Browsable(False)>分配给?
"只是我 < GR **** @ a-znet.com>在消息中写道
新闻:Oa ************** @ TK2MSFTNGP15.phx.gbl ...
Am I missing something?
Where would I place <Browsable(False)>
The AutoScroll property comes with the UserControl.
I don''t generate it.
Thanks
BTW will <Browsable(False)> keep the designer from assigning a value to the
property that <Browsable(False)> is assigned to?
" Just Me" <gr****@a-znet.com> wrote in message
news:Oa**************@TK2MSFTNGP15.phx.gbl...
我做了一个Usercontrol,使用时必须将AutoScroll设置为true。
因此我在Load事件中将其设置为True。
但是当控件时属性窗口仍显示属性
放在表格上。
那令人困惑。
如何让属性窗口中不显示该属性?
谢谢提前获取任何有用的信息
I made a Usercontrol that must have AutoScroll set to true when it is used.
So I set it to True in the Load event.
However the property still shows in the properties window when the control
is placed on a form.
That''s confusing.
How can I make that property not show in the properties window?
Thanks in advance for any useful info
这篇关于如何在属性窗口中显示属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!