HighTechTalks DotNet Forums  

extending properties within a collection

Dotnet Framework (WinForms DesignTime) microsoft.public.dotnet.framework.windowsforms.designtime


Discuss extending properties within a collection in the Dotnet Framework (WinForms DesignTime) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
KK
 
Posts: n/a

Default extending properties within a collection - 06-09-2005 , 10:27 PM






Hi

My validators derive from BaseValidator and
they EXTENDS certain properties to type Controls
by implementing IExtenderProvider.

Like in Tooltip component, If I drop my
validator components on to a form, relevent properties
get extended to the required controls.

However, what I want is to have just one component
inside which has other validator types. So I
did a FormValidator, component which has all the other
validators. FormValidator extends;

[TypeConverter(typeof(ValidatorCollectionConverter) )]
[Category("Validators")]
public ValidatorCollection GetValidators(Control control)
{
return validators;
}

Now, when I drop a FormValidator to a form
every relevent control in the form gets a
"Validators on formValidator1" extended propertry
which is expandable and inside I can see my other
Validators. Howerver, now I can't see the other validator's
extended properties.

In brief, when a FormValidator is dropped on to a form
I want the property grid to be something like;

[PropertyGird of TextBox]
.....
(+)Validators on formValidator1 (extended property from FormValidator)
(+)ValidatorType1
ErrorMessage on ValidatorType1
....
(+)ValidatorType2
ErrorMessage on ValidatorType2
....

I hope this explains the problem. Any way to do this?

rgds
KK




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.