Browsable Attribute

T

Thiruppathi S

Hi All,

Could any body plz help me.
I want to set the browsable attribute value of "property2 " according to
the value of "property1"

i could able to change the value of that property but not the attribute

plz help me

Regards

S.Thiruppathi,
 
J

John Saunders

Thiruppathi S said:
Hi All,

Could any body plz help me.
I want to set the browsable attribute value of "property2 " according to
the value of "property1"

i could able to change the value of that property but not the attribute

Attributes are compile-time things, mostly, so you can't easily do this.
Also, I can't think of an example of a component or control which hides one
property based on the value of another property.

You can throw an exception in the property setter for property2 based on the
value of property1.

Also, if you create a designer for your component, you can override the
PostFilterProperties method to replace the normal "property2" property
setter and replace it either with one that has Browsable(false), or, for
instance, with one which is read-only.

John Saunders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,813
Messages
2,569,699
Members
45,489
Latest member
SwethaJ

Latest Threads

Top