Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) shadow for a Node (Read 5616 times)
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
shadow for a Node
Jul 13th, 2012 at 10:52am
Print Post  
Dear Stoyan,

               how to draw a shadow for a selected node.

  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: shadow for a Node
Reply #1 - Jul 13th, 2012 at 11:26am
Print Post  
You can enable shadows by setting Diagram.ShadowsStyle. If you need to hide them for some nodes, set the nodes' ShadowOffset to 0.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: shadow for a Node
Reply #2 - Jul 16th, 2012 at 5:31am
Print Post  
Thanks stoyan,
         but i need to show the shadow only for the selected node.
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: shadow for a Node
Reply #3 - Jul 16th, 2012 at 9:24am
Print Post  
You will have to show and hide the shadow from respectively the NodeSelected and NodeDeselected event handlers, similarly to what you did for selection highlight earlier.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: shadow for a Node
Reply #4 - Jul 17th, 2012 at 7:29am
Print Post  
Dear stoyan,

  i am using the following code.but it is not working.

node_selected event


     diagram.ShadowsStyle = ShadowsStyle.OneLevel;
             e.Node.ShadowColor = Color.Gold;
             e.Node.ShadowOffsetX = 5;
             e.Node.ShadowOffsetY = 5;
  

if you want something then go and grab it
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: shadow for a Node
Reply #5 - Jul 18th, 2012 at 10:51am
Print Post  
any suggestions for me...
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: shadow for a Node
Reply #6 - Jul 18th, 2012 at 6:11pm
Print Post  
Use the ZOrder shadow style if the diagram contains some large background node - otherwise it will hide the shadows of nodes that are in front of it.
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: shadow for a Node
Reply #7 - Jul 19th, 2012 at 4:35am
Print Post  
Dear Stoyan,

        As your suggestion i have used Zorder . but still not working.            

diagram.ShadowsStyle = ShadowsStyle.ZOrder;
             e.Node.ShadowColor = Color.Gold;
             e.Node.ShadowOffsetX = 25;
             e.Node.ShadowOffsetY = 25;


FYR i have added the screen shot
  

3.JPG (Attachment deleted)

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: shadow for a Node
Reply #8 - Jul 19th, 2012 at 9:02am
Print Post  
If that's a ShapeNode, you will have to set Transparent=false to show the shadow.
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: shadow for a Node
Reply #9 - Jul 19th, 2012 at 9:27am
Print Post  
sorry stoyan,

          e.Node does n't have Transparent property
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: shadow for a Node
Reply #10 - Jul 19th, 2012 at 5:00pm
Print Post  
Typecast e.Node to ShapeNode to access that property:

ShapeNode shape = (ShapeNode)e.Node;
shape.Transparent = ...
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: shadow for a Node
Reply #11 - Jul 20th, 2012 at 6:33am
Print Post  
Thanks Stoyan,

             i tried, i is working on TableNode but not in ShapeNode

  

5.JPG (Attachment deleted)

if you want something then go and grab it
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: shadow for a Node
Reply #12 - Jul 20th, 2012 at 8:48am
Print Post  
Hi,

You can find attached to this post the Telephony sample from the FlowChart.NET release, with minor adjustments that show how to enable shadows on ShapeNodes on selection. It uses the settings you've provided above. It's working fine on my system (with FlowChart.NET 5.3.3).

Code
Select All
private void diagram_NodeSelected(object sender, NodeEventArgs e)
{
  ShapeNode node = e.Node as ShapeNode;
  if (node != null)
  {
    node.Transparent = false;
    node.ShadowColor = Color.Gold;
    node.ShadowOffsetX = 5;
    node.ShadowOffsetY = 5;
  }
}
 

  

Telephony.zip (Attachment deleted)
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: shadow for a Node
Reply #13 - Jul 20th, 2012 at 10:01am
Print Post  
Thanks a lot Lyubo...
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint