Hi all,
I'm having some problems with one of my controls. I derived a control
(MyImageButton) only to set a specific Image on it
(MyToolTipInfoButton) when calling the constructor. However, the
designer doesn't know about this change, because on the Image property
the DefaultValueAttribute is still null. When trying to override it, I
see that I can only use const values when creating the attribute.
The question is: how do I create a const Image? I know how to do
static, but const is a mistery.
I hope someone has a solution for this.
Thanks in advance,
Cosmin
CBanu [IXIA] - 26 Mar 2008 15:46 GMT
After searching a little more, I found the following article "Defining
Default Values with the ShouldSerialize and Reset Methods":
http://msdn2.microsoft.com/en-us/library/53b8022e(VS.80).aspx
Now all I need to do is to somehow remove the DefaultValueAttribute
from the Image property. Any ideas on this one?
Thanks,
Cosmin
> Hi all,
>
[quoted text clipped - 12 lines]
> Thanks in advance,
> Cosmin