Dialog.ComboBox

string Dialog.ComboBox ( 

string  Title,

string  Prompt,

table   Items,

string  DefaultItem,

boolean SortItems = false,

boolean Editable = false,

number  Icon = MB_ICONQUESTION )

Description

Presents a dialog box with a combo box control on it.

Parameters

Title

(string) The text to be displayed on the title bar of the dialog.

Prompt

(string) The text that will appear above the combo box.

Items

(table) A numerically indexed table containing the list of items that should be available in the combo box.

DefaultItem

(string) The default item that should be selected in the combo box. Use an empty string ("") for nothing to be selected.

SortItems

(boolean) Whether the items in the drop-down area should be sorted or not:

VALUE

DESCRIPTION

true

Sort the items in the drop down.

false

Don't sort the items. (Default)

Editable

(boolean) Whether the combo box text should be editable or if the user has to choose an item from the list:

VALUE

DESCRIPTION

true

The combo box text should be editable.

false

The user must choose an item from the list. (Default)

Icon

(number) The icon to display on the dialog:

CONSTANT

VALUE

DESCRIPTION

MB_ICONNONE

0

None.

MB_ICONSTOP

16

Stop.

MB_ICONQUESTION

32

Question. (Default)

MB_ICONEXCLAMATION

48

Exclamation.

MB_ICONINFORMATION

64

Information.

Returns

(string) The item that was selected from the combo box or the text that was entered if the field was editable, if the OK button is pressed. It will return "CANCEL" if the Cancel button is pressed. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions