ListSourceScriptAddListItem method (WinStudio scripts)

Applies To

IWSFormComponent interface, list source objects

Definition

Inserts entries into the list for a list source object.

Syntax

object.ListSourceScriptAddListItem( string )

  Part   Description
object Required. The name of a valid component object.
string Required. The name of the new tab-delimited list item.

Remarks

Typically, use this method in a script that functions as the list source for a component with a drop-down list (DropList component). However, you can also use it with List, ComboBox, or GridColumn components.

This API must be used from a global script that is referenced in the component's list source, where the list source is of type Script.

Example

Sub Main()
     ThisForm.Components( "ListComboBox" ).ListSourceScriptAddListItem( "Item 1" )
     ThisForm.Components( "ListComboBox" ).ListSourceScriptAddListItem( "Item 2" )
     ThisForm.Components( "ListComboBox" ).ListSourceScriptAddListItem( "Item 3" )
     ThisForm.Components( "ListComboBox" ).ListSourceScriptAddListItem( "Item 4" )
     ThisForm.Components( "ListComboBox" ).ListSourceScriptAddListItem( "Item 5" )
End Sub