Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Question about AllignToGrid (Read 1126 times)
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Question about AllignToGrid
Sep 2nd, 2009 at 3:40pm
Print Post  
Hi Stoyan,

I  have two questions about AllignToGrid property for Diagram control.
1. If there are some nodes and links before the AllignToGrid property is set to true, is there a way to refresh the Diagram to adjust all the elements allign to grid?

2. Can I change the grid spacing?

Thanks a lot!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Question about AllignToGrid
Reply #1 - Sep 2nd, 2009 at 5:05pm
Print Post  
Hi Chris,

1. You could loop over the nodes, call diagram.AlignPointToGrid(node.Bounds.Location) to get the grid point nearest to the node's top-left corner, and then call node.Move to move the node to the aligned point.

2. Set the GridSizeX and GridSizeY properties.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint