Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Creating LaneDiagram (Read 6691 times)
MeMoRis
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 19th, 2009
Creating LaneDiagram
Mar 26th, 2009 at 10:26am
Print Post  
Hi,
I want to create a LaneDiagram (like the demo example). But i want to create juste column with their title. And if i create shapes (by using drag and drop) i want to know in witch column the shape was created.
thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Creating LaneDiagram
Reply #1 - Mar 26th, 2009 at 11:42am
Print Post  
Hi,

The lanes in the demo are locked rectangular nodes at the back of Z order. The Locked property is available in this version:
https://mindfusion.eu/_temp/diaglite_newprops.zip

Stoyan
  
Back to top
 
IP Logged
 
MeMoRis
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 19th, 2009
Re: Creating LaneDiagram
Reply #2 - Mar 26th, 2009 at 12:14pm
Print Post  
Hi,
thanks for the replay. My request is if i can have a diagram with columns (for exemple : i define a diagram with 6 columns, and eatch column has a title and a background color)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Creating LaneDiagram
Reply #3 - Mar 26th, 2009 at 2:56pm
Print Post  
Hi,

You could create them like this:

Code
Select All
for (int i = 0; i < 6; ++i)
{
	Rect colRect = new Rect(i * colWidth, 0, (i + 1) * colWidth, colHeight);
	ShapeNode col = diag.Factory.CreateShapeNode(colRect);
	col.Locked = true;
	col.TextFormat = new StringFormat(StringAlignment.Center, StringAlignment.Top);
	col.Text = "...";
	col.Brush = new SolidColorBrush(...);
}
 



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


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 19th, 2009
Re: Creating LaneDiagram
Reply #4 - Mar 26th, 2009 at 3:14pm
Print Post  
Hi,
Thanks Stoyo it help me very much. But i still have a problem even if i use the last (ddl) : there is a compilation error in StringAlignment.Top ....
And i hope that we can know in witch colomn is every shape, and if we can rearrange shape such manner to have chape into column and not between two colomns
Thanks a lot
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Creating LaneDiagram
Reply #5 - Mar 26th, 2009 at 3:21pm
Print Post  
Hi,

I meant StringAlignment.Near.

You can find the column number of a shape by dividing node.Bounds.X by the column width. Similarly you can align your shapes to the columns by setting node.Bounds to a value between the columnNode.Bounds.Left and columnNode.Bounds.Right.

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


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 19th, 2009
Re: Creating LaneDiagram
Reply #6 - Mar 26th, 2009 at 3:27pm
Print Post  
Hi,
Near set the text in the middle of the column, but i want to set the text in the Top.
Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Creating LaneDiagram
Reply #7 - Mar 26th, 2009 at 3:31pm
Print Post  
I'm not sure about the order of arguments, set the 'lineAlignment' one to Near, and 'alignment' to center.
  
Back to top
 
IP Logged
 
MeMoRis
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 19th, 2009
Re: Creating LaneDiagram
Reply #8 - Mar 26th, 2009 at 3:36pm
Print Post  
col.TextFormat = new StringFormat(StringAlignment.Near, StringAlignment.Center);
Thaaaaaaaaaaaaaaanks
  
Back to top
 
IP Logged
 
MeMoRis
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 19th, 2009
Re: Creating LaneDiagram
Reply #9 - Mar 27th, 2009 at 9:38am
Print Post  
HI,
I have created columns by using the code :
for (int i = 0; i < 6; ++i)
{
Rect colRect = new Rect(i * colWidth, 0, (i + 1) * colWidth, colHeight);
ShapeNode col = diag.Factory.CreateShapeNode(colRect);
col.Locked = true;
col.TextFormat = new StringFormat(StringAlignment.Center, StringAlignment.Top);
col.Text = "...";
col.Brush = new SolidColorBrush(...);
}
and i set diagram.RouteLinks to true but it doesn't work.
If i delete column diagram.RouteLinks works !!!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Creating LaneDiagram
Reply #10 - Mar 27th, 2009 at 11:12am
Print Post  
Hi,

Set col.Obstacle = false. The Obstacle property is available in this version:
https://mindfusion.eu/_temp/diaglite_newprops.zip

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


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 19th, 2009
Re: Creating LaneDiagram
Reply #11 - Mar 27th, 2009 at 11:42am
Print Post  
Thanks,
It works perfectly.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint