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.

  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.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

pagelayoutbean/UseOverviewControl.java Main class




Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced