Hi,
I am having a realy annoying problem. I'm creating a custom control, which uses a complex property named GradientColor. GradientColor class is consisted of an (int) Angle, (AlphaColor) BeginColor and (AlphaColor) EndColor.
On the other hand, AlphaColor is another class that consists of an (int) Alpha and (System.Drawing.Color) Color. I use the AlphaColor class instead of an System.Drawing.Color structure so that the user could edit the System.Drawing.Color.A (Alpha) value using a custom UITypeEditor.
My problem is the following. When I change the values of the GradientColor property in the designer, the nested BeginColor and EndColor properties (which are also expanded) do not "refresh" properly. The designer's PropertyGrid shows two (?!) EndColor properties, an a BeginColor property. It looks as the designer did not "update" itself properly. When I re-expand the parent or the nested properties, everything looks the way it should.
I am overriding the GetCreateInstanceSupported and CreateInstance methods. The other thing is that when I expose an AlphaColor property directly from the control (not nested under GradientColor), it interacts with the designer normaly.
AviD - 08 Mar 2005 16:41 GMT
Hi
you need not work so hard. I've all the code that you need. Just go to my
site and download the source code of adxSuperPanel. You find a complete
Gradient class with all the properties that you need.
Http://www.gzdsoftware.com
Avi
> Hi,
>
[quoted text clipped - 12 lines]
>
> <Id>YdrIdd9iQ0+UYMcRuEpgrQ==</Id>
joeycalisay - 09 Mar 2005 10:16 GMT
how are you modifying the said properties? you need to broadcast each
change with the designer (raising componentchanging and componentchanged
properly) and this is done automatically if you changed this properties
using the typedescriptor.getproperties method, getting the
propertydescriptor using the propertyname and using the setvalue method. i
don't know the correct syntax but similar to this:
typedescriptor.getproperties(component)["myproperty"].setvalue(component,
newvalue as object)

Signature
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
Hi,
I am having a realy annoying problem. I'm creating a custom control, which
uses a complex property named GradientColor. GradientColor class is
consisted of an (int) Angle, (AlphaColor) BeginColor and (AlphaColor)
EndColor.
On the other hand, AlphaColor is another class that consists of an (int)
Alpha and (System.Drawing.Color) Color. I use the AlphaColor class instead
of an System.Drawing.Color structure so that the user could edit the
System.Drawing.Color.A (Alpha) value using a custom UITypeEditor.
My problem is the following. When I change the values of the GradientColor
property in the designer, the nested BeginColor and EndColor properties
(which are also expanded) do not "refresh" properly. The designer's
PropertyGrid shows two (?!) EndColor properties, an a BeginColor property.
It looks as the designer did not "update" itself properly. When I re-expand
the parent or the nested properties, everything looks the way it should.
I am overriding the GetCreateInstanceSupported and CreateInstance methods.
The other thing is that when I expose an AlphaColor property directly from
the control (not nested under GradientColor), it interacts with the designer
normaly.
Keesp - 30 Mar 2005 08:50 GMT
Hi,
I was wondering if you have made progress with your problem, as I am facing
the same issue.
My custom UIType editor seems to work okay, but I would expect it to call
the setValue method of the corresponding descriptor, in order to effectuate
the changes. Somehow this doesn't seem to happen (in some situations, such
as nesting complex objects). Got any clue how I can resolve this?
Thanx,
Kees