There are four basic types of controls with different purposes.
Function |
Controls include |
---|---|
Invoke actions |
CommandButtons, PictureButtons, PictureHyperLinks, StaticHyperLinks, Tabs, User Objects |
Display or accept data, or both |
ListBoxes, PictureListBoxes, DropDownListBoxes, DropDownPictureListBoxes, DataWindow controls, StaticText, ListViews, TreeViews, RichTextEdit, Graphs, Pictures, ProgressBars, ScrollBars, SingleLineEdits, MultiLineEdits, EditMasks, Tabs, user objects, OLE controls, MonthCalendar, DatePicker, InkEdit, and InkPicture controls |
Indicate choices |
RadioButtons, CheckBoxes (you can group these controls in a GroupBox), TrackBars |
Decorative |
Line, Rectangle, RoundRectangle, Oval, Animation |
You should use the controls only for the purpose shown in the table. For example, users expect radio buttons for selecting an option. Do not use a radio button also to invoke an action, such as opening a window or printing. Use a command button for that.
There are, however, several exceptions: user objects can be created for any purpose, and ListBoxes, ListViews, TreeViews, and Tabs are often used both to display data and to invoke actions. For example, double-clicking a ListBox item often causes some action to occur.
The following sections describe some features that are unique to individual controls. The controls are listed in the order in which they display on the Insert>Control menu and the drop-down controls palette:
Some controls are not covered in this chapter:
DataWindow controls and objects. See Chapter 18, “Defining DataWindow Objects.”
RichTextEdit controls. See Chapter 30, “Working with Rich Text.”
User objects. See Chapter 15, “Working with User Objects.”
Graph controls. See Chapter 26, “Working with Graphs.”
OLE controls. See Chapter 31, “Using OLE in a DataWindow Object.”