1 / 22

Lesley Bross, August 25, 2010

ArcGIS 10 Add-In Components and Controls. Lesley Bross, August 25, 2010. Add-in Components. Button. Wizard generates a class that extends ESRI Button class to implement run-time behavior of button Buttons can be added to toolbars, menus, or tool palettes in the add-in configuration file

asabi
Download Presentation

Lesley Bross, August 25, 2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ArcGIS 10 Add-In Components and Controls Lesley Bross, August 25, 2010

  2. Add-in Components

  3. Button • Wizard generates a class that extends ESRI Button class to implement run-time behavior of button • Buttons can be added to toolbars, menus, or tool palettes in the add-in configuration file • Users can add buttons to their toolbars through Customize… dialog • Example: override onClick() event with action to be taken; Buttons have no inherent action

  4. Tool • Wizard generates a class that extends ESRI Tool class to implement run-time behavior of tool • Tools can be added to toolbars, menus, or tool palettes in the add-in configuration file • Users can add tools to their toolbars through Customize… dialog • Tools are different from buttons because they require interaction with the map • Example: override onMouseDown(), onMouseUp()

  5. Button or Tool ? Tool • Button and tool images are packaged with the add-in • Tools stay active until a different tool is selected • Buttons trigger single actions Button

  6. Combo Box • Wizard generates a class that extends ESRI ComboBoxclass to implement run-time behavior of tool • A combo box contains a drop-down list optionally headed by an editable field • Combo boxes can be added to toolbars in the add-in configuration file • Users can add combo boxes to their toolbars through Customize… dialog • Example: Items are added to the Combo Box in the New() method • Example: Respond to user selection by overriding OnSelChange() method

  7. Editable combo box Combo Box

  8. Multi-item • Wizard generates a class that extends ESRI MultItemclass to implement run-time behavior of menu items • A MultiItem contains a drop-down list of menu items may be dynamically built • MultiItem objects are linked to Menus in the add-in configuration file • MultiItem objects cannot be accessed outside a Menu • Example: A list of menu items is generated in the OnPopup() method; Updates on every access • Example: Respond to user selection by overriding OnClick() method

  9. Multi-item menu • Note that the items on the menu are dynamically derived from the layers present on the map Multi-item menu

  10. Extension • Wizard generates a class that extends ESRI Extension class to implement run-time behavior of the extension • Coordinates activities between user components in an add-in • Can store state associated with an add-in and respond to events thrown by ArcMap • Example: Override Initialize() method to set defaults • Example: Override Uninitialize() method to clean up

  11. Editor Extension • Wizard generates a class that extends ESRI Extension class to implement run-time behavior of the editor extension • Generated class integrates with ArcMap editor framework and extension loads/unloads with edit session • Can automatically respond to selected events; Use for custom validation • Attributes window and digitizer extension are examples of editor extensions that ship with ArcMap • Example: Override Events_OnCreateChangeFeature() method to validate updates

  12. Dockable Window • Wizard generates a class that extends ESRI DockableWindowclass to implement design and run-time behavior of the dockable window • Toggle window display with a combo box, menu item, or button • Use as a form to display/gather user information • Use toolbox in design mode to create form. Both Windows and ArcMap tools are available • Example: Override onClick() method for a button on the dockable window to process information on the form

  13. Dockable Window example button to open/close window dockable window

  14. Add-in Command Bars

  15. Tool Palette • Configured in XML only • A compact way to group sets of tools or buttons. Columns attribute determines width • Grouping may include add-in tools that you create or built-in ArcMap tools • Tool palettes can be added to toolbars in the add-in configuration file • Users can add tool palettes to their toolbars through Customize… dialog

  16. Tool Palette example tool palette

  17. Toolbar • Configured in XML only • May contain buttons, tools, menus, tool palettes, and combo boxes • Toolbars can include commands that you create or built-in ArcMap tools • Toolbars may be configured to pop-up automatically when the add-in is added to ArcMap • Users can add toolbars to ArcMap through Customize… dialog

  18. Toolbar example

  19. Menu • Configured in XML only • Drop-down list comprised of multi-items, buttons, and submenus • Menus can access commands that you create or built-in ArcMap tools • Menus are usually added to a toolbar but may appear independently • A multi-item is added to a menu and a menu is added to a toolbar

  20. Menu example menu submenu

  21. Context Menu • Configured in XML only • Similar to menus except they appear independently as pop-up menus linked to controls on a form • Positioned relative to the mouse position

  22. Context menu example clicked button context menu

More Related