More About Controls
It's impossible to do a walkthrough of each control, but you now know the basic user interface controls and how to use them. Visual Studio .NET has many amazing new controls that you can use to make your user forms better than ever. Table 3.7 lists the remaining controls in the Toolbox that we didn't touch on today. Most of the controls share common properties with each other, and most are very self-explanatory. If you add a control to a form and aren't sure how to use it, remember to press the Ctrl+F1 key combination to get the dynamic Help for the control.
Table 3.7 Controls Available in Windows Forms
Control Name |
Description |
RichTextBox |
Enables text to be displayed with formatting in plain text or rich text format (RTF). |
LinkLabel |
Displays text as a Web-style link and triggers an event when the user clicks the special text. Usually the text is a link to another window or a Web site. |
StatusBar |
Displays information about the application's current state using a framed window, usually at the bottom of a parent form. |
CheckedListBox |
Displays a scrollable list of items, each accompanied by a check box. |
ComboBox |
Displays a drop-down list of items. |
DomainUpDown |
Displays a list of text items that users can scroll through with up and down buttons. |
ListBox |
Displays a list of text and graphical items (icons). |
ListView |
Displays items in one of four different views. Views include text only, text with small icons, text with large icons, and report view. |
NumericUpDown |
Displays a list of numerals that users can scroll through with up and down buttons. |
TreeView |
Displays a hierarchical collection of node objects that can consist of text with optional check boxes or icons. |
PictureBox |
Displays graphical files, such as bitmaps and icons, in a frame. |
ImageList |
Serves as a repository for images. ImageList controls and the images they contain can be reused from one application to the next. |
CheckBox |
Displays a check box and a label for text. Generally used to set options. |
CheckedListBox |
Displays a scrollable list of items, each accompanied by a check box. |
RadioButton |
Displays a button that can be turned on or off. |
Trackbar |
Allows users to set values on a scale by moving a "thumb" slider along a scale. |
DateTimePicker |
Displays a graphical calendar to enable users to select a date or a time. |
MonthCalendar |
Displays a graphical calendar to enable users to select a range of dates. |
ContextMenu |
Implements a menu that appears when the user right-clicks an object. |
NotifyIcon |
Displays an icon in the status notification area of the taskbar that represents an application running in the background. |
ToolBar |
Contains a collection of button controls. |
Panel |
Groups a set of controls on an unlabeled, scrollable frame. |
GroupBox |
Groups a set of controls (such as radio buttons) on a labeled, nonscrollable frame. |
TabControl |
Provides a tabbed page for organizing and accessing grouped objects efficiently. |