How to wrap labels in multiple line??

10/27/2017 2:02:47 AM
Total Posts 17

How to wrap labels in multiple line??

Dear Forum,,

how to wrap labels in multiple line when labels length exceed specified length of text in px??

10/30/2017 4:56:38 AM
MVP
Total Posts 323

Re: How to wrap labels in multiple line??

It is not possible to specify the length in pixels, only in characters, by using VB functions and the LabelExpression:

layer.LabelExpression = "IIF( LEN( NAME ) > 15, LEFT( NAME, 15) & vbLf & MID(NAME, 16), NAME)";

' NAME - a field name
' vbLf - VB line feed constant
' IIF - AspMap's VBScript function, see the documentation for the LabelExpression