Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problems with Controlhosts - Anchor, Routing,... (Read 2258 times)
mbuechler
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 39
Joined: Oct 21st, 2009
Problems with Controlhosts - Anchor, Routing,...
Mar 18th, 2010 at 1:10pm
Print Post  
Hi together.

I am working on an application where we use the object ControlHost. In this we show our own Control, where the User can interact. Unfortunately we have some problems in using other features with ControlHosts.

1.) When the Control is shown inside the ControlHost now Anchor is shown.

2.) When we try to draw a link from one host to another it is nessecary, that the control host is a littlebit bigger than the control, so we can draw the link from a free place of the host. Trying to draw a link from inside the control is not possible. So the user has to "aim" exactly betwee control an border of host.

3.) Routing algorithm of Flowchart does not really works with the controlhosts. With normal Boxes there is no problem. The Link is drawn arround boxes. But when there is a Controlhost, the link is not drawn around controlhosts.

Are there any tipps or advices we can use to solve these problems?

For understanding here is the creation of an controlhost. it based on the example "photobook"

ItemControl record = new ItemControl();
ControlHost photo = flowChart1.CreateControlHost(10, 10, 54, 37);
photo.Control = record;
photo.Tag = "Main";
record.Chost = photo;
Group group = flowChart1.CreateGroup(photo);
group.Tag = photo;


photo.CtrlMouseAction = EHostMouseAction.hmaSelectHost;

photo.AnchorPattern = new AnchorPattern(


new AnchorPoint[]
{
new AnchorPoint(0, 0, true, true, EMarkStyle.msRect),
new AnchorPoint(0, 10, true, true, EMarkStyle.msRect),
new AnchorPoint(10, 10, true, true, EMarkStyle.msRect),
new AnchorPoint(10, 0, true, true, EMarkStyle.msRect)
});


thanks for all help
  
Back to top
 
IP Logged
 
mbuechler
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 39
Joined: Oct 21st, 2009
Re: Problems with Controlhosts - Anchor, Routing,.
Reply #1 - Mar 18th, 2010 at 1:51pm
Print Post  
Little Add On.

the third Problem isn't relevant anymore. Now I use ControlNodes instead of ControlHosts and the Routing works. But the other problems, drawing Link and Anchor is still acutall
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problems with Controlhosts - Anchor, Routing,.
Reply #2 - Mar 18th, 2010 at 3:20pm
Print Post  
Hi,

1. There's nothing we can do about it. The controls are rendered in their own windows and hide the anchor points rendered in the flowchart's window. If you are now starting a new project, consider our WPF diagramming control - WPF allows for much better integration of custom controls in the diagram's visual tree.

2. Setting ControlMouseAction to IgnoreControl should let you do that, as long as the control does not capture the mouse input.

Stoyan
  
Back to top
 
IP Logged
 
mbuechler
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 39
Joined: Oct 21st, 2009
Re: Problems with Controlhosts - Anchor, Routing,.
Reply #3 - Mar 18th, 2010 at 3:51pm
Print Post  
Ok, that helps allready.
What about the anchors of a link. how do i size them. I changed the measure of the diagram from milimeter to pixel and now the anchors at the beginning an the end of the links are really small. can i change them?
what about the anchors of the node?

Thanks again.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problems with Controlhosts - Anchor, Routing,.
Reply #4 - Mar 18th, 2010 at 3:58pm
Print Post  
If you mean the selection handles, set the AdjustmentHandlesSize property (SelHandlesSize in older versions of the control).
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint