Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Node + label and layout (Read 3104 times)
Mike
Guest


Node + label and layout
Oct 14th, 2005 at 3:40am
Print Post  
I'm dynamically drawing a graph (node at a time, redrawing on each update) that needs an icon + label for each node.  To do i create two boxes, and attach them together using AttachTo.

However, when I call Arrange on the graph, they get separated.

Is there any way I can group items together so they act together as a single node?

Although I could use a table I dont really want to as it changes the look/feel.  Custom drawing he node seems a bit like overkill.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node + label and layout
Reply #1 - Oct 14th, 2005 at 4:31am
Print Post  
Set the label boxes' IgnoreLayout property to true so the layout routines dont' change their position, and the labels will just stick to the icon boxes.

All layout classes have a KeepGroupLayout property which does something similar, and now I see we forgot to mention it in the docs. You might try that instead of InoreLayout.

The difference between the two methods is that KeepGroupLayout makes a group treated as an integral graph node and includes in its size the sizes of all included boxes, while with the IgnoreLayout method only the size of the icon boxes would be considered.

HTH
  
Back to top
 
IP Logged
 
mike
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Oct 14th, 2005
Re: Node + label and layout
Reply #2 - Oct 14th, 2005 at 5:14am
Print Post  
Stoyo, you da man!  spot on, and I'm amazed in how quick you posted an answer Smiley

A great library - well worth it.

Cheers,
Mike
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node + label and layout
Reply #3 - Oct 14th, 2005 at 8:19am
Print Post  
Thanks  Grin
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint