Book Image

ArcGIS By Example

By : Hussein Nasser
Book Image

ArcGIS By Example

By: Hussein Nasser

Overview of this book

Table of Contents (17 chapters)
ArcGIS By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding the search textbox in the toolbar


We have learned in the previous chapters how we can add a button and a tool to the toolbar. However, we can actually add more useful control to the toolbar that doesn't exist by default, by extending ArcObjects project in a similar way to a textbox or a dropdown menu. We can add almost any control in windows to the ArcGIS toolbar (as long as it fits of course). Here we will see how to add a textbox and use it to filter the map later. First we will add a new form, add a textbox to it, and resize the form to fit the text. Then we will add a button to the toolbar and replace it with the text control. Follow these steps to do so:

  1. If necessary, open Visual Studio Express in administrator mode.

  2. Go to File, then click on Open Project, browse to the Bestaurants project from the C:\ArcGISByExample\bestaurants\Code, and click on Open.

  3. From the Project menu, click on Add Windows Form and name it txtSearchForm.vb.

  4. In the form properties, scroll until you find FormBorderStyle...