Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) layerlayout (Read 10225 times)
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
layerlayout
Apr 6th, 2011 at 2:46pm
Print Post  
hi,

i was using layer layout.
having just nodes
set to any orientation showing
all nodes in one layer in horizontal

how to display in node in number of  layers

thanks

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: layerlayout
Reply #1 - Apr 6th, 2011 at 3:14pm
Print Post  
Hi,

This will treat each node as a separate graph in the diagram and apply the MultipleGraphsPlacement value. Set it to MultipleGraphsPlacement.MinimalArea and the nodes should be arranged as in a grid if they are the same size. If that's the case and you won't ever create links in this diagram, you can also arrange them in a grid as below.
Code
Select All
int nodesOnLayer = 10;
for (int i = 0; i < diagram.Nodes.Count; ++i)
{
	diagram.Nodes[i].Move(
		(i % nodesOnLayer) * 50, (i / nodesOnLayer) * 50);
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: layerlayout
Reply #2 - Apr 6th, 2011 at 3:26pm
Print Post  
thank you
nice and quick reply
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: layerlayout
Reply #3 - Apr 6th, 2011 at 4:22pm
Print Post  
hi how can i chage the shape of node
to particular image
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: layerlayout
Reply #4 - Apr 6th, 2011 at 4:28pm
Print Post  
hi
i have shape nodes  i try to chang shape 

if (title == "Report")
           {
              childNode.Image = treeViewImageList2.Images[1];
           }

but inserting image in shape node?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: layerlayout
Reply #5 - Apr 6th, 2011 at 4:30pm
Print Post  
Hi,

The Image property lets you show a bitmap image inside a node. To change the node's geometric shape, set the Shape property to one of the members of the Shapes class.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: layerlayout
Reply #6 - Apr 6th, 2011 at 4:49pm
Print Post  
hi

i want to set the shape to particular image shape not the shapes class shapes

can i do that

i even tried using

snode.shape.image=image;

its same this... so how can i

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: layerlayout
Reply #7 - Apr 6th, 2011 at 4:55pm
Print Post  
If you need to show only a bitmap image and hide the node's geometric shape, assign the bitmap to ShapeNode.Image and set ShapeNode.Transparent = true.
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: layerlayout
Reply #8 - Apr 7th, 2011 at 8:15am
Print Post  
Hi ,

how can i display text at the bottom of the node instead of the middle


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: layerlayout
Reply #9 - Apr 7th, 2011 at 8:28am
Print Post  
Hi,

Code
Select All
// center text at the bottom
StringFormat format = new StringFormat();
format.Alignment = StringAlignment.Center;
format.LineAlignment = StringAlignment.Far;
node.TextFormat = format; 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: layerlayout
Reply #10 - Apr 7th, 2011 at 8:49am
Print Post  
hi stoyo,

but its is still inside the node i want like at the bottom appear like not attached to node.
just below the icon.

thanks

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: layerlayout
Reply #11 - Apr 7th, 2011 at 9:46am
Print Post  
Hi,

You could fit both the image and text in the same node if you make the node higher and set ImageAlign = Top and TextFormat.Alignment = Far. Otherwise you could use attached label nodes, or change the TextArea of the shapes you are using, e.g.

Code
Select All
Shapes.Rectangle.TextArea = new LineTemplate[]
{
	new LineTemplate(-25, 100, 125, 100),
	new LineTemplate(125, 100, 125, 150),
	new LineTemplate(125, 150, -25, 150),
	new LineTemplate(-25, 150, -25, 100)
};
diagram.DefaultShape = Shapes.Rectangle; 



If you modify the text region like that, use LineAlignment = Near instead of Far.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: layerlayout
Reply #12 - Apr 7th, 2011 at 9:48am
Print Post  
Another option is to use CompositeNodes with a vertical StackPanel inside and add an ImageComponent and TextComponent to the panel.
  
Back to top
 
IP Logged
 
vchimakurthi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Apr 6th, 2011
Re: layerlayout
Reply #13 - Apr 7th, 2011 at 11:46am
Print Post  
hi,

then how i can i use attached label nodes.

there is no property or ..

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: layerlayout
Reply #14 - Apr 7th, 2011 at 11:55am
Print Post  
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint