AddGadgetItem()

Syntax

AddGadgetItem(#Gadget, Position, Text$ [, ImageID])
Description
Add an item to the specified #Gadget. An optional ImageID() can be specified for any gadgets which support it (like ListIconGadget()).

The following gadgets are supported:

- ComboBoxGadget()
- EditorGadget()
- ListIconGadget() : supports the ImageID. The image must be in the standard 16x16 icon size.
- ListViewGadget()
- MDIGadget() : ImageID can contain an icon for the childwindow titlebar.
- PanelGadget() : supports the ImageID.
- TreeGadget() : supports the ImageID. The image must be in the standard 16x16 icon size.

The position specifies the item index where the new item should be inserted. To add the item at the start, use an index of 0. To add this item to the end of the current item list, use a value of -1. Remember that when you add an item that all current items which come after the new one will have their positions increased by 1.

Note: Please take a look at the notes in the chapter Windows Message Handling about the message handling on Windows.

Supported OS

All

<- AddGadgetColumn() - Gadget Index - AdvancedGadgetEvents() ->