Use page layout controls


Purpose
This sample application contains two PageLayout controls. The Browse dialog allows you to search and select map documents, which are validated and loaded into the main PageLayout control, triggering the OnPageLayoutReplaced event. The OnPageLayoutReplaced event determines the MxPath property of the main PageLayout control and uses it to load the same document into the second PageLayout control with the LoadMxFile method.
 
The OnExtentUpdated event is triggered when you zoom in on the main PageLayoutControl. The event uses the AddElement method to add an element displaying the visible extent of the main PageLayout control on the second PageLayout control. Previous elements on the second PageLayout control are found using the FindElementByName method and are deleted from the GraphicsContainer. The Refresh method is used to refresh the graphics to reflect the changes.

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. Run the UseOverviewControl application.
  2. Click the Load button to browse your file system for a map document to load into the PageLayout control.
  3. Press the left mouse button to zoom in, and the right mouse button to pan the main PageLayout control.
  4. View the visible extent on the other PageLayout control.


Download the files for Java
pagelayoutbean/UseOverviewControl.java Main class




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