Listbox
From Lianjapedia
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Contents
Description
Shown below in a standalone Form. Click the image to see in a Custom Section in a Lianja Page.
Listbox is a control with a single column list.
Properties
This class supports the Common Properties plus the following:
Property | Access (R/RW) | Value | Description |
---|---|---|---|
ActiveRow | RW | Numeric | Currently selected row number |
ColumnCount | RW | Numeric | Number of columns in the List |
KineticScrolling | RW | Boolean | Whether kinetic scrolling is enabled, default is False. With kinetic scrolling, the user can flick in a given direction and it will continue to scroll in this direction until it is stopped either by the user or by friction. Setting KineticScrolling to true provides touch scrolling on touch aware devices and left mouse button pressed and moved scrolling on non-touch aware devices. |
ListCount | R | Numeric | Number of items in the List |
ListIndex | RW | Numeric | Current item index value. Starts from 1. |
RowCount | R | Numeric | Number of rows in the List |
RowSource | RW | Character | Source of data to which the object is bound |
RowSourceType | RW | Numeric | Type of Source of data to which the object is bound: 1 = comma-separated string 2 = table 3 = SQL statement 5 = array 6 = comma-separated fieldlist 8 = table field structure |
SelectionMode | RW | Numeric | Selection mode for the listbox: 0 = No items can be selected. No item is highlighted, but the value property returns the last clicked item. 1 = Single item can be selected. The value property returns the last clicked item. 2 = Multiple items can be selected (click one after the other). The value property returns a comma-separated list. 3 = Multiple items can be selected (use shift-click and ctrl-click to select). The value property returns a comma-separated list. 4 = Multiple items can be selected using shift-click and ctrl-click, but the value property returns only the last selected item. From v5.5. |
Text | RW | Character | Currently selected row text |
Value | RW | Character | Currently selected row text |
Methods
This class supports the Common Methods plus the following:
Method | Args | Description |
---|---|---|
AddItem | item as Character | Add an item |
AddItems | selectstatement as Character | commalist as Character | pipelist as Character | items as Array | Add items based on an SQL SELECT query, a comma-separated list, a pipe-separated list or an array |
Clear | None | Clear the ListBox |
Item | itemnumber as Numeric | Return the text of the specified item |
List | itemnumber as Numeric | Return the text of the specified item |
RemoveItem | itemtext as Character | itemnumber as Numeric | Remove the specified item |
Events
This class supports the Common Events plus the following:
Event | Args | Description |
---|---|---|
InteractiveChange | None | Occurs when an item is selected |