Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Node selection style (Read 2939 times)
jaiswalamit
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Feb 17th, 2009
Node selection style
Mar 16th, 2009 at 2:04pm
Print Post  
I have disabled the node expand and edit. So if I now click a node I am no more able to drag the corners and enlarge or shrink the node, which is great.
But the drag corners (the 8 big squares) still appear around the corners. What I want instead is that there should be a full rectangle around the node with thin line just engulfing my node and it's image to represent that the node is in "selected" state. Is it possible in DGL.

Thanks,
Amit
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node selection style
Reply #1 - Mar 16th, 2009 at 2:39pm
Print Post  
At this time it could be possible if you create a derived node class and override the AddHandlesToCanvas() method. We'll port the HandlesStyle property from the WinForms version for the v1.0.3 release; it provides some predefined selection handles styles such as a frame around the node.

Stoyan
  
Back to top
 
IP Logged
 
Sachin
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 85
Joined: Mar 14th, 2009
Re: Node selection style
Reply #2 - Sep 23rd, 2009 at 5:12am
Print Post  
HI  i am deriving from the Shape Node class

how to implemnet AddHandlesToCanvas

because i  dont want  Big Squres Selection
i wnat to select only the Border how to do ?>
pls send sample code
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node selection style
Reply #3 - Sep 23rd, 2009 at 5:47am
Print Post  
Set node.HandlesStyle = HandlesStyle.HatchFrame or DashFrame. You might also make the selection handles smaller by setting diagram.AdjustmentHandlesSize /= 2.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Sachin
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 85
Joined: Mar 14th, 2009
Re: Node selection style
Reply #4 - Sep 23rd, 2009 at 6:34am
Print Post  
HI i am override the AddhandletoCanvas
below the coe

  protected override void AddHandlesToCanvas()
       {
           base.AddHandlesToCanvas();
           if (this.Selected == true)

               this.HandlesStyle = HandlesStyle.DashFrame;
       }

here
when i click the node first time square rectangles coming second time red color border coimg is fine
if i  use                    fbdiagram.AdjustmentHandlesSize /= 8;    
this is reducing the  size of the rectangle

i need when ever i click only selected border should come also borer should be custom color based on my condition color should come .


regards
murugan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node selection style
Reply #5 - Sep 23rd, 2009 at 7:19am
Print Post  
Hi,

Don't set HandlesStyle = HandlesStyle.DashFrame in the AddHandlesToCanvas implementation, but in the init code for your nodes. The base.AddHandlesToCanvas call will add the handles as set by that property. If you set the property, you wouldn't need to override AddHandlesToCanvas at all.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint