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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access