Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / March 2005

Tip: Looking for answers? Try searching our database.

Nested Complex Properties Designer Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
?eljko Margeta - 07 Mar 2005 19:01 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.