Nevron Forum

NLineShape text label bounds

https://www.nevron.com/Forum/Topic3808.aspx

By Steele Arbeeny - Thursday, July 15, 2010

I am using NLineShape to connect 2 shapes that will later be laid out using NSpringLayout.

I would like to place a text label oriented with the NLineShape. However if the text is longer than the line it extends past the endpoints of the line. Is there a way to either get the text to clip or wrap to the extents of the NLineShape ? The default NLogicalLineLabel does not contain a Mode property, and If I use a NBoundsLabel, the text is not oriented with the NLineShape. I dont think I can clip the text myself becasue I dont know the length of the line becasue it is set by the layout algorithm.

Is there any way to do this ?

Thanks in advance...


Steele

By Nevron Support - Thursday, July 15, 2010

Hi Steele,

Clipping or trimming of texts is currently not supported by the diagramming component. A possible workaround is to measure the text and compare its dimensions to the length of the line after the layout is completed. Then you can trim the characters which go out of the line bounds by yourself.