By Volvick Derose 1 - Thursday, August 26, 2010
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.
|
By Nevron Support - Monday, August 30, 2010
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.
|
By Volvick Derose 1 - Monday, August 30, 2010
I have already fixed this, don't worry about it.
|
|