Command Prompt for Windows




Command CBGET

Function:

Get the index of the currently selected string, if any, in the list box of a combo box. The index is stored in an environment variable called CBGET.

Syntax:

CBGET dlg_id id
dlg_idSpecifies the identifier of the dialog box that contains the combo box.
idSpecifies the identifier of the combo box.

Note:

The index returned is zero based, that is, the first string in the list box of a combo box is at index 0, the second string is at index 1 and so on.

When the list box of a combo box does not contain a currently selected string then a value of -1 is returned.

Also see command CBSET and CBTEXT.