Using ArcCatalog
Using ArcCatalog
Using ArcCatalog
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Working with UIControls<br />
If you create a macro and add it to a toolbar, you’ve essentially<br />
customized what happens when you click the button. UIControls,<br />
however, let you create custom commands with VBA that work<br />
similarly to the buttons, tools, combo boxes, and edit boxes that<br />
come with <strong>ArcCatalog</strong>.<br />
Typically in <strong>ArcCatalog</strong>, you use buttons to start, end, or<br />
interrupt an action or a series of actions. When you create a<br />
button, you write code that sets its properties including its<br />
ToolTip, the message that appears in the status bar describing<br />
what the button does, and whether it’s enabled. You also define<br />
the code that responds to the button’s click event; this is the<br />
code that runs when you click the button on a toolbar.<br />
Though similar to buttons, tools let you interact with the display—for<br />
example, you can zoom in or pan around your map in<br />
Geography view. In addition to setting the tool’s properties, your<br />
code can respond to mouse and key events—clicking a mouse<br />
button or pressing a key—and to someone selecting, doubleclicking,<br />
or right-clicking the tool. A tool can respond when the<br />
display refreshes or when it is deactivated.<br />
A combo box combines the features of a text box and a list box.<br />
You can use combo boxes to provide a set of items to choose<br />
from, or you can let someone type a value that isn’t in the list.<br />
You can add or remove entries from the list using the combo box.<br />
Its properties let you work with the selected item or the text in the<br />
edit box as well as determine how many entries are in the list. The<br />
combo box can respond to several events such as changing the<br />
current selection or changing the text in the edit box. As with<br />
buttons and tools, you can also set the control’s ToolTip and<br />
provide a status bar message.<br />
Edit boxes let you display information entered by the user or data<br />
derived from an external source. The Clear method removes the<br />
contents of the edit box, while the Text property provides access<br />
to the text that’s displayed. You can specify whether or not the<br />
control is enabled and have the tool respond when someone<br />
changes the text or presses a key. You can set the control’s<br />
ToolTip and its status bar message.<br />
Writing code for a command’s event procedures lets the command<br />
respond to user interaction or the current state of the<br />
Catalog. And, by using combo and edit boxes in <strong>ArcCatalog</strong>, you<br />
might be able to avoid using a dialog box or UserForm to get<br />
information. UIControls let you create sophisticated custom<br />
commands that make <strong>ArcCatalog</strong> an efficient and powerful way<br />
to create and finish your projects.<br />
CUSTOMIZING ARCCATALOG 253