all groups > dotnet windows forms designtime > may 2006 >
You're in the

dotnet windows forms designtime

group:

How to hide inherited properties for a custom control


RE: How to hide inherited properties for a custom control David Husselmann
5/22/2006 10:08:01 PM
dotnet windows forms designtime:
In your designer class, have a look at overriding the PreFilterProperties
method. This allows you to remove properties from the property grid.

[code]
protected override void
PreFilterProperties(System.Collections.IDictionary properties) {
base.PreFilterProperties(properties);

properties.Remove("AccessibleDescription");
properties.Remove("AccessibleName");
properties.Remove("AccessibleRole");
}
[/code]

[quoted text, click to view]
Re: How to hide inherited properties for a custom control Carlo (mcp)
5/23/2006 12:00:00 AM
Hi
this is good for classes that has a visual design-mode interface. They must
have a Designer attribute. But what's about a class that does NOT has
Designer attribute?
..c.




-------------------------------------------
Carlo, MCP (Windows Based Applications)
carlodevREMOVE@gmail.com


[quoted text, click to view]

How to hide inherited properties for a custom control daniel
5/23/2006 12:02:27 AM
Hi all,

I created a new control derived from UserControl class. For this new control
I added some new properties. How can I show only these new properties for
this control at design time in PropertyGrid control?

Thanks,
Dan

Re: How to hide inherited properties for a custom control V
5/23/2006 2:48:28 AM
Hi Carlo, I am not sure if this will work, but you could override all
the base class properties in your derived class and attach the
attribute which makes them invisible in the Property Grid.

- Vaibhav
Re: How to hide inherited properties for a custom control V
5/23/2006 2:50:06 AM
I looked it up and the attribute that you can add to the Overriding
properties in the derived class would be [Browsable(false)]

- Vaibhav
Re: How to hide inherited properties for a custom control Dei
5/23/2006 1:57:42 PM
My control inherited some properties like Location, Size. How can I override
these properties in my derived class?
I removed "Location" properties for my control by overiding
PreFilterProperties function but in this case I'm not able to move my
control using. All the time the location will be (0, 0).


[quoted text, click to view]

Re: How to hide inherited properties for a custom control DEI
5/23/2006 4:34:14 PM
Do you have any ideea how to hide "Location" propertie. (how to set
Browsable(false) for it) ?

Thanks,
Daniel

[quoted text, click to view]

AddThis Social Bookmark Button