Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ControlNode size based on Control (Read 1545 times)
SavyCat
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 38
Joined: Sep 4th, 2007
ControlNode size based on Control
Feb 11th, 2008 at 8:22am
Print Post  
Hi guys, how do you make it so that a ControlNode's bounds are as big as the UserControl that I specify as its control property. I tried the obvious:

Bounds = new RectangleF(0,0,Control.Width, Control.Height);

But this is too large. Any help would be greatly appreciated. Ive looked at the differences between Rect and RectF and it says the '=' operator is supposed to make the conversion for you - but no luck.

Thanks
Mat
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlNode size based on Control
Reply #1 - Feb 11th, 2008 at 11:04am
Print Post  
Hi Mat,

Use the ClientToDoc method to convert from the control's pixel coordinates to the diagram's millimeters (or whatever unit is set in MeasureUnit).

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
SavyCat
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 38
Joined: Sep 4th, 2007
Re: ControlNode size based on Control
Reply #2 - Feb 11th, 2008 at 3:40pm
Print Post  
Oh of coourse Tongue Sorry bout that and thanks  Embarrassed
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint