Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Positon of controls within Control Host (Read 2654 times)
Karen Mc Geady
Guest


Positon of controls within Control Host
Sep 26th, 2005 at 1:50pm
Print Post  
I ahve a few questions around the recommended approach to adding controls to a flowchart.

The provided sample uses control hosts and allows the user to resize and re-position the controls however it only places one control in each host.

Is there any way to provide this functionality without using control hosts?

I am reluctant to use control hosts because I want to set the position of the control relative to the flowchart rather than the host.

Any ideas on this would be great

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Positon of controls within Control Host
Reply #1 - Sep 26th, 2005 at 2:32pm
Print Post  
You could use the flowchart as a container and set it as a parent of your controls. E.g. try the

fc.Controls.Add(new YourControlClass())

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Positon of controls within Control Host
Reply #2 - Sep 26th, 2005 at 2:35pm
Print Post  
If you do this, the child controls will stay at the location you set them, and won't scroll when the flowchart is scrolled, nor users will be able to select or move them.

If you want your users to be able to move the controls, try using ControlHosts and handle the Scroll event. When Scroll is raised, move the host nodes to a position relative to the [fc/ScrollX, fc.Scrolly] point. That  will make the controls stay in the same screen position even when the flowchart is scrolled.

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