Collection property and control owner

  • Thread starter Thread starter R.A.F.
  • Start date Start date
R

R.A.F.

Hi,

I have a custom control in which i have a property called
"RowsCollection". This property is a CollectionBase class.
this class allows user to add new rows to the property.

I defined in my RowsCollection a private variable member which holds the
basic height of each row to 20;

when i create a row thanks the RowsCollection property, each row have a
property Height, but it is setup to 0.

How can i do to pass such default value (20) to each row, only during
row creation ?

thanks a lot,

RAF
 
RAF,

You would have to declare a constructor that takes the height, and then
pass the value to the constructor when the instance is created.
 
Hi Nicholas,

this i know, but how to do from a property which is in fact a collection ?

how the Add function from collectionBase can pass such information ?
or should it be done thanks my custom collection property editor ?
if yes, where and how ?

this i've never done before.

thanks a lot,

RAF
 
Back
Top