Add text elements to map


Purpose
This sample demonstrates how to use the Symbology control to add text symbols and to control the style of those text elements. 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 sample application.
  2. Click Open to load a map document into the PageLayout control.
  3. Click Select Text Symbol on the toolbar.
  4. Select a text symbol from the dialog box and click OK.
  5. Type the desired text in the text box and select a size from the drop-down list.
  6. Right-click the display. The text element is added.


Download the files for Java
symbologybean/AddTextElementToMap.java Uses the Symbology control to add customized text to the page layout.
symbologybean/ui/SymbologyFrame.java Opens a dialog box with text symbols loaded in the dialog frame.




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