WinStudio
IWSFormComponent interface, list source objects
Inserts entries into a list.
object.ListSourceScriptAddEntries( listEntries )
Part |
Description |
object | Required. A reference to a list source component object. |
listEntries | Required. A list of type System.Collections.Generic.List(Of String). |
List source components include the following component types:
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.
In the following example:
Putting this code in the list source for a component of type drop-down list populates the list with a form's components.
Sub Main() Dim bListInitialized As Integer Dim ComponentNames As New List(Of String) Dim FormName As String On Error GoTo ErrorHandler ReturnValue = "0" bListInitialized = 0 FormName = GetParameter(0).ToString() ComponentNames = Application.FormServer.GetFormComponentNames("FormName") ThisForm.Components(GetParameter(1)).ListSourceScriptAddEntries(ComponentNames) Exit Sub ErrorHandler: Application.ShowMessage("GetComponentList: " & Err.Description) ReturnValue = "1" Exit Sub End Sub