Jimmy,
Well, creating something with the appropriate return types is easy, just
expose ImageIndex and ImageKey properties on your component which will just
forward the calls to the underlying imagelist control.
To get designer support, you should look at those properties on the
Label in Reflector. If you do, you will see that there are some attributes
that are attached to the property. You want to copy these attributes to the
same properties on your control. The attributes you want are:
DefaultValue
Editor
RefreshProperties
TypeConverter
Once you apply those, it should give you what you want.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Jimmy V" <go*****@gmail.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
Hey guys and gals,
I am creating a composite control and need to expose the ImageList and
all related properties of a label in this control; I do not want to
expose the entire label. What I am looking for is a way to get the
ImageKey and ImageIndex properties to behave the same as they do with
the base label control, i.e. I want to a drop down with the available
values in the ImageKey and ImageIndex in the property window when a
user adds the control to their form. Any ideas on how I can expose
these properly? I want them to have the same return types as their
respective values. Am I missing something very easy or is this a more
involved problem?
Thanks,
Jimmy V