V
Vera
Hi,
I built a user control myPanel derived from the Panel
class.
In myPanel I added code for an indexer which looks like
this:
private Color[] mColor = new Color[10];
[IndexerName("Colors")]
public Color this [int i]
{
get
{
if (i < 0 || i >= 10)
return Color.Empty;
else
return mColor;
}
set
{
if (i < 0 || i >= 10)
// Do nothing
else
{
mColor = value;
}
}
}
I also added some properties that are not indexed.
When I add myPanel to a form, I see all the properties
that I added in the property window, but I don't see the
indexer.
What did I do wrong?
Can anybody help me with this, please?
Thanx a lot!
Vera
I built a user control myPanel derived from the Panel
class.
In myPanel I added code for an indexer which looks like
this:
private Color[] mColor = new Color[10];
[IndexerName("Colors")]
public Color this [int i]
{
get
{
if (i < 0 || i >= 10)
return Color.Empty;
else
return mColor;
}
set
{
if (i < 0 || i >= 10)
// Do nothing
else
{
mColor = value;
}
}
}
I also added some properties that are not indexed.
When I add myPanel to a form, I see all the properties
that I added in the property window, but I don't see the
indexer.
What did I do wrong?
Can anybody help me with this, please?
Thanx a lot!
Vera