Hiding null properties of a component

  • Thread starter Thread starter Sujith Manuel
  • Start date Start date
S

Sujith Manuel

Hi All,

I have one component developed in C#. It has got three properties and only
one of them will be having value at design time. This means that values of
other two properties will be null.

Whenever I drag & drop this component into a form, VS.NET is giving a
warning as :

" The object 'MyComponent1' returned null for the property 'Property1' but
this is not allowed."

Is it possible to hide some properties a component based on it's value; or
is there ay way to avoid this problem.

Thanks in advance,
Sujith Manuel.
 
Sujith Manuel said:
Hi All,

I have one component developed in C#. It has got three properties and only
one of them will be having value at design time. This means that values of
other two properties will be null.

Whenever I drag & drop this component into a form, VS.NET is giving a
warning as :

" The object 'MyComponent1' returned null for the property 'Property1' but
this is not allowed."

Is it possible to hide some properties a component based on it's value; or
is there ay way to avoid this problem.

Thanks in advance,
Sujith Manuel.

I'm not sure if this answers your question, but you should investigate the
BrowsableAttribute class:

http://msdn.microsoft.com/library/d...omponentmodelbrowsableattributeclasstopic.asp

Erik
 
Back
Top