在Web Mapping应用中添加和删除工具按钮
Removing tools from the toolbar in Design view
- 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.
- 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.
- In the Toolbar Items column, select a tool to remove.
- Click Remove.
- When done, click OK.
- Resize the toolbar, if necessary.
- Save your changes.
- 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
- 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.
- 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.
- Select a tool you want to add from the left panel, and click Add.
- If you want to change the reference to the location of the image, click Show Properties. Otherwise, click OK.
- Click on the DefaultImage property, and then click the ellipsis button.
- 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"
- Save your changes.
- To see your changes in a browser, select File from the menu, and click View in Browser.
Removing and adding tools in Source view
- In Source view, search for "Toolbar1".
- Scroll a few lines until you see <ToolbarItems>.
- 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" />
--> - If you want to add a tool back in, remove the HTML comment code.
- Save your changes.
- 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) 编辑 收藏 举报