Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Group Resizing & Text alignment dbts (Read 2205 times)
Vidhya Ganesan
Guest


Group Resizing & Text alignment dbts
Jun 23rd, 2006 at 2:45am
Print Post  
Hi,

Plz let me know if the following 2 scenarios is possible in flowchart.net.

1) Can text in a box be aligned to top left corner?

2) I have a box A which has N boxes attached to it and these boxes are contained with the box A.  A is the mainobject in the group. When i resize A, I dont want its child items to go out of its bound. Also the resizing of child should not exceed the parent bound.   Is it possible to do this functionality ?

Regards
Vidhya Ganesan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Group Resizing & Text alignment dbts
Reply #1 - Jun 23rd, 2006 at 6:30am
Print Post  
Hi,

Set both the Alignment and LineAlignment properties of the Box.TextFormat to Near.

You can use the AttachTo(Node, percents...) method and the child nodes will be resized together with their parent staying within the parent bounds. We can add some new members to Node.Constraints to let you prevent moving/resizing a child outside of its parent.

Regards,
Stoyan
  
Back to top
 
IP Logged
 
Vidhya Ganesan
Guest


Re: Group Resizing & Text alignment dbts
Reply #2 - Jun 26th, 2006 at 6:05pm
Print Post  
Hi,

Thanks for your response.


Regd Group resizing, I will not be able to use AttachTo( percent) as i dont want to resize the child when the parent is resized.  I have written custom code to avoid the children going out of parent bounds when parent is resized. Plz let me know if there is any feature available to do this.

I am right now using Flowchart.net professional edition Version4.1.

You have mentioned that you can provide some new members in Node.Constraints to let us prevent moving/resizing a child outside of its parent.  Do we need to do a feature request to Mindfusion for this requirement?

Regards
Vidhya Ganesan

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Group Resizing & Text alignment dbts
Reply #3 - Jun 27th, 2006 at 5:53am
Print Post  
Hi,

You might use custom drawing and set the clipping region to the group parent before calling the actual drawing code, e.g. try this

void fc_DrawBox(...)
{
  e.Graphics.Clip = new Region(parentRect);
  e.Box.CustomDraw = CustomDraw.None;
  e.Box.Draw(...);
  e.Box.CustomDraw = CustomDraw.Full;
  // clear the clipping region ...
}

You will get endless recursion in the DrawBox handler if you don't clear the CustomDraw attribute before calling Box.Draw.

Our developers will add a new property to NodeContraints in a few days.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Group Resizing & Text alignment dbts
Reply #4 - Jun 30th, 2006 at 1:15pm
Print Post  
This version adds a node.Constraints.KeepInParent property:

https://mindfusion.org/_temp/fccons.zip

Set it to true to prevent users from moving the node outside of its MasterGroup.MainObject node. The value of this property is not being serialized yet when saving files; it will be set to false when a diagram file is loaded.
« Last Edit: Jun 30th, 2006 at 4:21pm by Stoyo »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint