DlgListBox.InsertItem

number DlgListBox.InsertItem ( 

number ControlID,

number Index,

string Text )

Description

Inserts an item into a list box control at the specified position.

Note: This action will only work if called from a screen's events and if the named control is on the current screen.

Parameters

ControlID

(number) The numeric ID of the list box control that you want to insert an item into.

Index

(number) The position you want to insert the item into. The first item in the list has the index 1. To insert the item at the end of the list you can use the index -1.

Text

(string) The text of the item being inserted.

Returns

(number) The position of the inserted item. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions