Label of NLineShape


Author
Message
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,

To move the text of a line below it you should modify the Offset property of the line shape’s text style. For example:

 

NTextStyle textStyle = (NTextStyle)document.ComposeTextStyle().Clone();

textStyle.Offset = new NPointL(0, 10);

NStyle.SetTextStyle(line1, textStyle);

 

The background of the text is transparent by default, so you do not need to do anything about it. Anyway if you want to modify the background style of the text, use the BacplaneStyle.FillStyle property of the text style.



Best Regards,
Nevron Support Team


Guido Lauerburg
Guido Lauerburg
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 1
Hello,

I am trying to modify an NLineShape's label. Per default, the label's text is on the white background covering the line shape, and is arranged along the line's axis. I want it to be placed below the line, and having a transparent background. Could anyone help me there?

The line is created like this:

messageArrow = new NLineShape();
nDrawingDocument1.ActiveLayer.AddChild(messageArrow);
messageArrow.StyleSheetName = NDR.NameConnectorsStyleSheet;
messageArrow.Text = m.Name;

I tried to manipulate the messageArrow.Labels.DefaultLabel's style, but for no effect...

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