![]() ![]() | ||
As discussed in the In Depth section of this chapter, combo boxes combine a text box and a list box (which is why they're called combo boxes). In fact, combo boxes are derived from the ListBox class:
Object MarshalByRefObject Component Control ListControl ComboBox
You can find the more notable public properties of the ComboBox class in Table 7.7, the more notable methods in Table 7.8, and the more notable events in Table 7.9. Note that as with other Windows forms controls, I am not listing the notable properties, methods, and events ComboBox inherits from the Control class, such as the Click event—you can see all that in Chapter 5, Tables 5.1, 5.2, and 5.3.
Method |
Means |
---|---|
BeginUpdate |
Turns off visual updating of the combo box until the EndUpdate method is called. |
EndUpdate |
Resumes visual updating of the combo box. |
FindString |
Finds the first item in the combo box that begins with the indicated string. |
FindStringExact |
Finds the item that matches the indicated string exactly. |
GetItemText |
Gets an item's text. |
Select |
Selects a range of text. |
SelectAll |
Selects all the text in the text box of the combo box. |
Event |
Means |
---|---|
DropDown |
Occurs when the drop-down portion of a combo box is shown. |
DropDownStyleChanged |
Occurs when the DropDownStyle property has changed. |
SelectedIndexChanged |
Occurs when the SelectedIndex property has changed. |
![]() ![]() | ||