IsListBoxEntrySelected method (WinStudio scripts)

Applies To

IWSFormComponent interface, List component type objects

Definition

Returns a Boolean value indicating whether an entry in a list box (List type component) is the selected entry.

Syntax

object.IsListBoxEntrySelected( integer )

  Part   Description
object Required. A reference to a List component type object.
integer Required. The zero-based index number of the list entry.

Remarks

A return value of:

  • TRUE indicates that the entry is the selected entry.
  • FALSE indicates that the entry is not the selected entry.
Note:  This method does not work with other list source components, such as drop-down lists, combo boxes, or grid columns.

Example

Sub Main()
   If ThisForm.Components("list1").IsListBoxEntrySelected(3) Then
      Application.ShowMessage("That's the one. Good job!")
   Else
      Application.ShowMessage("Wrong selection! Try again.")
   End If
End Sub