We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Group Derived Objects become transparent upon selection

Thread ID:

Created:

Updated:

Platform:

Replies:

78803 Dec 31,2008 08:53 PM UTC Jan 12,2009 10:51 PM UTC WinForms 2
loading
Tags: Diagram
Eric Robishaw
Asked On December 31, 2008 08:53 PM UTC

I have a custom class node object derived from "Group".

When I place it on the diagram all is good.

However, when I select it, the alpha goes up about 30% and never returns.
If I deselect it, and then reselect it, it goes another 30...etc,, eventually the object becomes invisible.

I have traced the problem down to the last 2 lines of the SelectTool.PerformMove() method:
MoveTool tool = new MoveTool(base.Controller, this, node);
tool.ProcessMouseDown(evtArgs);

the MoveTool makes the objects semi-transparent for move purposes...that's cool.
However, for some reason on these derived nodes, when the mouseUP event occurs, the alpha is not restored.

Note also: if I just group 2 objects on the diagram this does not occur. It's only with these derived group objects.

I must not be handling something in the Group class, but can't figure out what.




Ajeet M [Syncfusion]
Replied On January 2, 2009 07:11 AM UTC

Hi Eric,

I am afraid but I was not able to reproduce the issue mentioned by you.

The sample is located in the following location under the documents folder:

------
\Documents\Syncfusion\EssentialStudio\6.4.0.15\Windows\Diagram.Windows\Samples\2.0\Designing Symbols\CustomSymbol\CS
------

I would be glad if you could send us your sample with complete details of how to reproduce the issue. Also, do mention us your installation details ( version number, .NET framework etc).

Thanks and Regards,
Ajeet



Eric Robishaw
Replied On January 12, 2009 10:51 PM UTC

Found the problem:
my derived group class overrode the Clone() method and return a shallow copy using MemberwiseCopy().

When the MoveTool starts to move the object, it first creates a clone of the object, then sets the transparency of the object to 50%. However, because I was returning a shallow copy, the children of my group were each being affected, instead of a copy of the children, and thus, the transparency was getting halfed every time it was selecetd.

Anyhow, if anyone experiences this in the future... make sure you do a full, deep copy, in the Clone() method, or you'll run into problems.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;