3

How do I make all the rectangle or (legend box) all the same ? Look at the circles I marked in the pictures. It should be very simple thing to do. Anyone out there have a good workaround ?

Example

2

Seems like the simplest thing to do would be to use the Drawing toolbar to create a rectangle graphic in your layout and use that as the background for your legend instead of the legend's built-in background (which you'll need to turn off in the legend properties). The graphic rectangle will not change size when your legend does. Just size the rectangle so it will accommodate the largest legend you'll be using.

2

To do this you can right-click on each Legend element and access the Size and Position tab of its Properties where you can explicitly set its Width and Height:

enter image description here

These actions can be automated using ArcPy to set the elementHeight and elementWidth properties - see LegendElement (arcpy.mapping).

  • True, however if the element is not converted to graphic first then the text font increases which may not be desired. – artwork21 Aug 25 '14 at 19:55
2

I'm guessing your legends are dynamic now, meaning whatever is listed in your TOC is what is being displayed. Longer layer names will make your legend box wider.

Here are some options:

Convert to graphic

  1. Convert legend to Graphics (right click on layout legend element and select Convert to Graphic)
  2. Select each graphic and Ungroup
  3. Manually move, and expand each legend box to align/look the same

Extend layer name

Another workaround would be to extend one of your layer names to equal the number of total characters for the one data frame that has the longest name. Name could be extended with blank spaces, see example below (Layer 4 name extended with blank spaces to equal longest layer name from other data frame). This option you do not have to worry about converting to graphic and assigning things. This option may be scripting using python to get layer name lengths using python/arcpy.

enter image description here

  • I think this is too much if you have mutiple MXD files; however if you do just one project and with not much change it is good. – PROBERT Aug 25 '14 at 18:40
  • Added another option per my answer. – artwork21 Aug 25 '14 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.