Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem setting Bounds.Y Coordinate (Read 1756 times)
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Problem setting Bounds.Y Coordinate
Oct 25th, 2012 at 10:14am
Print Post  
Doing this:
Code
Select All
lastShapeNode.Bounds.Y = 10; 



Getting this error:

Error      1      Cannot modify the return value of 'MindFusion.Diagramming.DiagramNode.Bounds' because it is not a variable      
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem setting Bounds.Y Coordinate
Reply #1 - Oct 25th, 2012 at 10:21am
Print Post  
Since RectangleF is a struct, you must assign a new instance to Bounds:

lastShapeNode.Bounds = new RectangleF(x, 10, w, h);
  
Back to top
 
IP Logged
 
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Re: Problem setting Bounds.Y Coordinate
Reply #2 - Oct 25th, 2012 at 4:08pm
Print Post  
Solved.
Thanks, that worked.

Used it like this:

Code
Select All
lastShapeNode.Bounds = new System.Drawing.RectangleF(lastShapeNode.Bounds.X, lastShapeNode.Bounds.Y, lastShapeNode.Bounds.Width, lastShapeNode.Bounds.Height - ((lastShapeNode.Bounds.Bottom) - (diagramPB.Bounds.Bottom))); //. ((diagramHeight / extVarStages) * 4); 

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