在Web Mapping应用中添加和删除工具按钮

Removing tools from the toolbar in Design view

  1. In Design view, click the Toolbar control in the upper left of the design area, or select Toolbar1 from the dropdown list in the Properties window.
  2. Click on the ToobarItems property, and then click the ellipsis  button. The Toolbar Collection Editor appears containing a list of available toolbar items and current toolbar contents.
  3. In the Toolbar Items column, select a tool to remove.
  4. Click Remove.
  5. When done, click OK.
  6. Resize the toolbar, if necessary.
  7. Save your changes.
  8. To see your changes in a browser, select File from the menu, and click View in Browser.


Adding tools to the toolbar in Design view

  1. In Design view, click the Toolbar control in the upper left of the Design area, or select Toolbar1 from the dropdown list in the Properties window.
  2. Click on the ToobarItems property, and then click the ellipsis button. The Toolbar Collection Editor appears containing a list of available toolbar items and current toolbar contents.
  3. Select a tool you want to add from the left panel, and click Add.
  4. If you want to change the reference to the location of the image, click Show Properties. Otherwise, click OK.
  5. Click on the DefaultImage property, and then click the ellipsis button.
  6. Manually type in the path and image name. To reference the images directory associated with the application use "~/Images/" followed by the image name. An example is "~/Images/zoom-in.png"
  7. Save your changes.
  8. To see your changes in a browser, select File from the menu, and click View in Browser.

Removing and adding tools in Source view

  1. In Source view, search for "Toolbar1".
  2. Scroll a few lines until you see <ToolbarItems>.
  3. If you want to remove a tool, use HTML comment codes (<!-- . . .-->) to comment out the tool you do not want included in the toolbar.
    <!--
    <esri:Tool ClientAction="startMeasure()" DefaultImage="~/images/measure.png" HoverImage="~/images/measure.png" JavaScriptFile="" Name="Measure" SelectedImage="~/images/measure.png" Text="Measure" ToolTip="Measure" />
    -->
  4. If you want to add a tool back in, remove the HTML comment code.
  5. Save your changes.
  6. To see your changes in a browser, select File from the menu, and click View in Browser.

posted on 2011-04-09 14:49  Joshua Leung  阅读(275)  评论(0编辑  收藏  举报

导航