Connector Shape


Author
Message
Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1
I have two questions

First:

I try to add a line connector to a library, see the attached picture. It looks like when the line is drawn horizontally, it does not show the picture. In the attached picture, see line 2 and 3. I know I can add a PNG for picture, but is there a way to fix that?

For instance, try to add the following to the library, then it will not show you the picture.

NLineShape lineShape = new NLineShape(100, 100, 600, 100);

Second:
This is the second question. Take a look of the picture and look at line one. I could not find a way to draw a connector (just like the first item in the picture) with double arrow (arrow in both end). I order to do that, I try to draw two like item2 and item3 in the picture and combine them. Everything works fine, but I have one problem. I try to do a composite shape, but the composite shape remove the glue and the arrow. In this case, I have to group them. I don't have any problem with the grouping, the only problem I have, if the user try to select one by clicking at the end, one of them can be moved without the other. Just take a look of the code below

public NGroup DrawShape()
{
NLineShape lineOneShape = new NLineShape(200, 100, 100, 100);
NLineShape lineTwoShape = new NLineShape(200, 100, 700, 100);

lineOneShape.StyleSheetName = NDR.NameConnectorsStyleSheet;
lineTwoShape.StyleSheetName = NDR.NameConnectorsStyleSheet;

NGroup lineGroup = new NGroup();
lineGroup.Shapes.AddChild(lineOneShape);
lineGroup.Shapes.AddChild(lineTwoShape);

NAbilities groupProtection = lineGroup.Protection;
groupProtection.Ungroup = false;
lineGroup.Protection = groupProtection;

NInteractionStyle interactionStyle = lineGroup.InteractionStyle;
interactionStyle.Rotation = false;
interactionStyle.RotatedBounds = false;
interactionStyle.PinPoint = false;
lineGroup.InteractionStyle = interactionStyle;

return lineGroup;
}

Anyway, while I am typing this message, I find out that. If I set a protection for each item separately like movex and movey disable, that fix the moving.

Attachments
pic1.png (118 views, 15.00 KB)
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi

please elaborate your first question. What are you trying to do ? To add an image to fill a line shape ?

Regarding your second question - it's very easy to make a double arrow connector. All you have to do is to set its StartArrowHeadStyle and EndArrowHeadStyle to be arrows. If you are going to have many such shapes we recommend you use a style sheet to get the best possible performance.



Best Regards,
Nevron Support Team


Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1
I have already fixed this, don't worry about it.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search