ComboBoxScreenGadget()

Syntax

Result = ComboBoxScreenGadget(#ScreenGadget, x, y, Width, Height [, Flags])
Description
Creates a ComboBox gadget in the current GadgetList. Once a ComboBox is created, its list of items is empty.

Parameters

#ScreenGadget A number to identify the new gadget. #PB_Any can be used to auto-generate this number.
x, y, Width, Height The position and dimensions of the new gadget.
Flags (optional) Not supported.

Return value

Nonzero on success, zero otherwise. If #PB_Any was used as the #ScreenGadget parameter then the return-value is the auto-generated gadget number on success.

Remarks

To add a 'mini help' to this gadget, use ScreenGadgetToolTip().

The following functions can be used to act on the list contents:
- AddScreenGadgetItem(): Add an item.
- CountScreenGadgetItems(): Count the items in the current combobox.
- ClearScreenGadgetItems(): Remove all the items.
- RemoveScreenGadgetItem(): Remove an item.

- GetScreenGadgetState(): Get the index (starting from 0) of the current element.
- GetScreenGadgetText(): Get the (text) content of the current element.
- SetScreenGadgetState(): Change the selected element.
- SetScreenGadgetText(): Set the displayed text. If the ComboBoxGadget is not editable, the text must be in the dropdown list.

Supported OS

All

<- CloseScreenWindow() - ScreenGadget Index - ContainerScreenGadget() ->