共用方式為


ListBox Control

Creates a list box.

ListBox

Remarks

A list box displays a list of items from which you can select one or more items. A list box is similar to a combo box; however, a combo box initially displays a single item.

You can disable an item in a listbox by prefacing the expression with a single backslash ("\"). Because of this functionality, backslashes are treated differently for this control. For each backslash you need to display in text, you must provide two. For example, the following code contains a listbox item containing a UNC path.

MyForm.List1.AddItem("\\\\MyServer\\MyMachine\\MyFolder")
   && displays in the listbox as \\MyServer\MyMachine\MyFolder

You can also use an ActiveX control that adds extra characteristics, such as a checkbox, to the listview or treeview controls.

For additional information about creating ListBox controls, see Form Designer and Using Controls.

See Also

ListBox Control Properties, Methods and Events | CREATE CLASS | CREATE FORM | DEFINE CLASS