|
Group: Forum Members
Posts: 71,
Visits: 1
|
Your solution should works, but there is something wrong with it. It looks like it only works for shape that are not added to the library.
Try this for instance
NLineShape lineShape = new NLineShape (0, 0, 500, 0);
this create an horizontal line.
Now try to add one port to it like
NPointPort port = new NPointPort(); line.Ports.AddChild(port); port.Location = new NPointF(0, 0); port.Tag = new NPointF(0, 0);
It does not matter you can put it anywhere one the line (presumably)
Now add it to the library, then when you drag it from the library, you can see that the point stays fix at location (0,0), as you move the line, the point does not move. So it looks like is not a part ofthe line. I spend times on it and I couldn't get it right. I try an example from the digram designer by using the logicalpoint line, it seems to work fine in the digram designer, but not outside the digram designer.
Hope you make it work
|