Concatenate Text boxes and Long Labels

649
2
08-10-2010 06:26 PM
Status: Open
AndrewHansford
Occasional Contributor II

Hi All,

I did a quick search and didnt find anything on this yet.

I find it very fraustrating:

  • for text boxes that      when you want if you want your text to be on multiple lines you have to      manually add line breaks.
  • For Labels it is      fraustrating when your label exceeds the bounds of your polygon.

It would really great to have several options:

Textboxes:

  • The ability to have      something similar to Textboxes in Visual Basic Editor where you have      options to set it to a multi-line textbox.
  • The ability to change      the size of the textbox without changing the size of the text
  • And some basic formatting      options in the Textbox dialog box.

Labels:

  • The ability to set a length      limiter on labels (for example, if text length = 20, go to the nearest “space”      then create a line break
  • The ability to have a      setting that limits the label to the polygon

I think these changes would be extremely useful.

Cheers

Andrew

2 Comments
JenniferStone
Oh, absolutely! Especially with the labels. I am working on a county highway map and do not have access to the maplex license so have been beating my head into a brick wall trying to  get my labels to look right. I figured out how to write an expression to create multi lines from one field value (see below just in case you need to know) but there are still those field values which are just too long to display right. I'd love to be able to take say, the first word of the field value, and use that as the label. I know you can right an "IF...Then...ELSE" statement for the longer ones, just haven't figured it out yet. A built in tool/button/magic wand for this would be great!
JenniferStone
The script for multi-lines, as promised. This should go into your "Label Expression" area. [Primary Name] should be replaced with whatever the name of your field is. This looks for spaces and replaces each space with a new line. If you use another delimiter (i.e.: , /, \, :, ;, etc...) replace the " " with " , " (or whatever your delimiter is, if it's not a comma.

Function FindLabel ( [PrimaryNam] )
  FindLabel = replace( [PrimaryNam] ," ", vbnewline)
End Function