Hi,
when using "List of something", we will set the editor as a CollectionEditor. This CollectionEditor will be the regular CollectionEditor for "object" (like a List<Car>) or a PrimitiveTypeCollectionEditor for others (like List<string>, List<int>...).
The PrimitiveTypeCollectionEditor is a kind of a big TextBox, letting you edit manually the items.
What you could do is use an "array of int" and edit the indexes when you set the attribute "ExpandableObject".
Here's the new property :
when using "List of something", we will set the editor as a CollectionEditor. This CollectionEditor will be the regular CollectionEditor for "object" (like a List<Car>) or a PrimitiveTypeCollectionEditor for others (like List<string>, List<int>...).
The PrimitiveTypeCollectionEditor is a kind of a big TextBox, letting you edit manually the items.
What you could do is use an "array of int" and edit the indexes when you set the attribute "ExpandableObject".
Here's the new property :
[ExpandableObject]
public int[] TypeArray
{
get;
set;
}
and the new line in the constructor of the "Test" class:this.TypeArray = new int[] { 9, 8, 4, 2, 4 };
In the propertyGrid, you can then open the expander and edit the indexes of the array. Please note that there could be a bug if your array has more than 10 items : indexes could be sorted alphabetically instead of numerically, ex : 1, 10, 2, 3... instead of from 0 to 10. This will be fixed in v2.7.