Re: How can I make a property not show in the properties window?
From: Jay B. Harlow [MVP - Outlook] (Jay_Harlow_MVP_at_msn.com)
Date: 02/27/05
- Next message: Nikolay Petrov: "get Excel table names"
- Previous message: Mohamoss: "RE: How to refresh the generated code??"
- In reply to: Dennis: "Re: How can I make a property not show in the properties window?"
- Next in thread: Just Me: "Re: How can I make a property not show in the properties window?"
- Reply: Just Me: "Re: How can I make a property not show in the properties window?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 27 Feb 2005 11:30:38 -0600
Dennis,
If you want to "override" the *attributes* of a not overridable property.
You can Shadow the property.
>> <Browsable(False)> _
>> Public Shadows Property AutoScroll() As Boolean
>> Get
>> Return MyBase.AutoScroll
>> End Get
>> Set(ByVal Value As Boolean)
>> MyBase.AutoScroll = Value
>> End Set
>> End Property
Note: Shadowing a property to change the attributes is one of the few times
when you need to "design" with Shadows. Otherwise Shadows should be reserved
for version control...
However as Herfried suggests, Control.AutoScroll is overridable in VB.NET
2003.
Hope this helps
Jay
"Dennis" <Dennis@discussions.microsoft.com> wrote in message
news:857EB3D0-5085-4CA6-AE31-F1161A0D3C99@microsoft.com...
> AutoScroll cannot be overridden!
>
> "Herfried K. Wagner [MVP]" wrote:
>
>> " Just Me" <groups@a-znet.com> schrieb:
>> > Am I missing something?
>> > Where would I place <Browsable(False)>
>> > The AutoScroll property comes with the UserControl.
>> > I don't generate it.
>>
>> Untested:
>>
>> \\\
>> <Browsable(False)> _
>> Public Overrides Property AutoScroll() As Boolean
>> Get
>> Return MyBase.AutoScroll
>> End Get
>> Set(ByVal Value As Boolean)
>> MyBase.AutoScroll = Value
>> End Set
>> End Property
>> ///
>>
>> --
>> M S Herfried K. Wagner
>> M V P <URL:http://dotnet.mvps.org/>
>> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
>>
- Next message: Nikolay Petrov: "get Excel table names"
- Previous message: Mohamoss: "RE: How to refresh the generated code??"
- In reply to: Dennis: "Re: How can I make a property not show in the properties window?"
- Next in thread: Just Me: "Re: How can I make a property not show in the properties window?"
- Reply: Just Me: "Re: How can I make a property not show in the properties window?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|