Get Selection Index

Read/Write Block - List Box

Description

The Get Selection Index block returns the position of the selection bar in a list box with the first item in the list being at location 1. A value of 0 indicates that no selection has been made.

When a project is first started the only blocks shown are for the Prompter which is predefined. As Text, Editor, and List objects are added to the project the Read/Write block list grows showing blocks for the added objects

Escapes

The Get Selection Index block does not generate any escapes.

Examples

This console shows a list of numbers in a list box.

The list was filled in with number using this block list. Note that the event is Setup and not Autostart. Setup executes after the Console appears and the list is available to receive information.

The Show Index button has this block list.

If no item on the list is chosen the result of clicking Show Index is this.

If an item is selected the 1-based index is shown:

Related Topics

Set Selection Index