Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Limit AdapterHandles minimum resize? (Read 2376 times)
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Limit AdapterHandles minimum resize?
Dec 22nd, 2010 at 7:42pm
Print Post  
Is possible limit adpater handles?
I wnat limit the minimum size component can be resized when i drag adpater handles.


Basically what im trying to do is know if possible limit the minimum size node can have.
Example, on eocmponent i use in node is button, original size is 50 x 35 pixels.
Node can be more bigger but never resized more little of the original button size.
Im working with the example provided called form editor.

Best regards.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Limit AdapterHandles minimum resize?
Reply #1 - Dec 23rd, 2010 at 8:53am
Print Post  
Try handling NodeCreated and setting Width and Height of node.Bounds to Math.Max(current value, min value), and also set the MinWidth and MinHeight properties of node.Constraints.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Limit AdapterHandles minimum resize?
Reply #2 - Dec 23rd, 2010 at 7:02pm
Print Post  
Sotyo, again i apologize for request the same over and over again, but if you post portion of code really be wonderfull i making some test and cant make thsi work:

Best regards.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Limit AdapterHandles minimum resize?
Reply #3 - Dec 27th, 2010 at 10:06am
Print Post  
E.g. add this to the end of form_Clicked if you will allow creating nodes only through click events:

node.Constraints.MinWidth = 50;
node.Constraints.MinHeight = 35;

Note that this sets the node minimum size, and not the size of the child controls inside. Since the <rectangle> in your user control has very large margins, nothing is seen when the node has the minimum size, so perhaps you should add the margin values to the 50 x 35 size.

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