N
niyad
hi
On a form ive added my custom component (MyComponent) which has a property
(IDs in the expample code) exposing a collection of int16. I see this
property in the PropertyGrid and I dont have trouble adding items to the
collection at design time (using standard CollectionEditor class). I can
Add, remove items at design time, however all the items are lost after a
compilation.
public class MyComponent : Component{
Int16Collection int_col;
public Int16Collection IDs{
get{
return int_col;
}
set{
int_col = value;
}
}
}
Here's my custom collection class.
public class Int16Collection : CollectionBase {
public Int16 this[ int index ]{
get{
return( (Int16) List[index] );
}
set{
List[index] = value;
}
}
.....
....
I dont understand how/why all the items added at design time disappear on
compilation of the form. Where are the items saved between design time and
compilation time?
any help much appreciated
On a form ive added my custom component (MyComponent) which has a property
(IDs in the expample code) exposing a collection of int16. I see this
property in the PropertyGrid and I dont have trouble adding items to the
collection at design time (using standard CollectionEditor class). I can
Add, remove items at design time, however all the items are lost after a
compilation.
public class MyComponent : Component{
Int16Collection int_col;
public Int16Collection IDs{
get{
return int_col;
}
set{
int_col = value;
}
}
}
Here's my custom collection class.
public class Int16Collection : CollectionBase {
public Int16 this[ int index ]{
get{
return( (Int16) List[index] );
}
set{
List[index] = value;
}
}
.....
....
I dont understand how/why all the items added at design time disappear on
compilation of the form. Where are the items saved between design time and
compilation time?
any help much appreciated