Modify legend format


Purpose
This sample demonstrates how to use the Symbology control to modify the legend format to change AreaPatch and LinePatch symbols. This sample uses the Symbology control in conjunction with the PageLayout control, the Toolbar control, and the controls commands.

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start the ModifyLegendFormat application.
  2. Click Open to load a map document into the PageLayout control.
  3. Click the AddLegend button. A legend is added to the page layout. (To delete the legend, click the DeleteLegend button.)
  4. Click the ChangeAreaPatch button. A dialog box opens with area patch symbols.
  5. Select a symbol and click OK. The selected symbol is applied to the legend.
  6. Repeat steps 4 and 5 using the ChangeLinePatch button to change the line patch symbol.


Download the files for Java
symbologybean/ModifyLegendFormat.java Uses the Symbology control to change the legend format.




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView
ArcEditor
ArcInfo