Using the ComboBox Control

The ComboBox control is the ideal control to present a list of choices in a confined amount of screen space. The ComboBox appears as a TextBox control with an arrow on the right-hand side. A list of options drops down below the control when the user clicks the arrow. When the user selects an option or clicks the arrow again, the list of options rolls up again.

Adding items to the ComboBox control can be done both at design time and at runtime. To add items to the ComboBox at design time, simply select the ComboBox in the Form Designer. Then click the ellipsis next to the Items property in the Properties window. This will bring up the String Collection Editor (see Figure 3.9). In the String Collection Editor, enter the ...

Get Microsoft® .NET Compact Framework Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.