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 ?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
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.
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:
These actions can be automated using ArcPy to set the elementHeight and elementWidth properties - see LegendElement (arcpy.mapping).
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
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.