Top  | Previous | Next

List

A basic List

A basic List

Description

The List component displays a list of options, allowing freeform selection of the items. It is powered by a Dataset, from which it displays the first column.

Properties

Appearance

Font

Font of text of this component

Scripting name

font

Data type

Font

Foreground Color

The foreground color of the component.

Scripting name

foreground

Data type

Color

Background Color

The background color of the component.

Scripting name

background

Data type

Color

Layout Orientation

This property defines the orientation of the list elements.

Scripting name

layoutOrientation

Data type

int

Values

0

Vertical

1

Vertical Wrap

2

Horizontal Wrap

Visible Row Count

An integer specifying the preferred number of rows to display without requiring scrolling.

Scripting name

visibleRowCount

Data type

int

Row Height

An integer specifying the row height, or -1 for automatic row height.

Scripting name

rowHeight

Data type

int

Selected Foreground

The color of the foreground for the selected cell(s).

Scripting name

selectedForeground

Data type

Color

Selected Background

The color of the background for the selected cell(s).

Scripting name

selectedBackground

Data type

Color

Selected Focus Border

The border for the selected, focused cell.

Scripting name

selectedFocusBorder

Data type

Border

Antialias

Draw with antialias on? Makes text smoother

Scripting name

antialias

Data type

boolean

Flags

expert

Styles

Contains the component's styles

Scripting name

styles

Data type

Dataset

Flags

bindable | expert

Behavior

Selection Mode

This mode determines if only one cell can be selected at once, or single or multiple intervals

Scripting name

selectionMode

Data type

int

Values

0

Single

1

Single Interval

2

Multiple Interval

Common

Name

The name of this component.

Scripting name

name

Data type

String

Flags

bindable

Enabled

If disabled, a component cannot be used.

Scripting name

componentEnabled

Data type

boolean

Visible

If disabled, the component will be hidden.

Scripting name

visible

Data type

boolean

Flags

bindable

Border

The border surrounding this component. NOTE that the border is unaffected by rotation.

Scripting name

border

Data type

Border

Mouseover Text

The text that is displayed in the tooltip which pops up on mouseover of this component.

Scripting name

toolTipText

Data type

String

Opaque

If false, backgrounds are not drawn. If true, backgrounds are drawn.

Scripting name

opaque

Data type

boolean

Cursor

The mouse cursor to use when hovering over this component.

Scripting name

cursorCode

Data type

int

Values

0

Default

1

Crosshair

2

Text

3

Wait

12

Hand

13

Move

4

SW Resize

5

SE Resize

6

NW Resize

7

NE Resize

8

N Resize

9

S Resize

10

W Resize

11

E Resize

Data

Data

The data for the list. If multiple columns exist, the first will be used.

Scripting name

data

Data type

Dataset

Flags

bindable

Selected Index

The index of the selected cell, or -1 if none.

Scripting name

selectedIndex

Data type

int

Flags

bindable | expert

Data Quality

The data quality code for any tag bindings on this component.

Scripting name

dataQuality

Data type

int

Flags

bindable | expert

Scripting

Events

The following event sets are fired by this component. See Component Event Handlers to learn more.

mouse
mouseMotion
focus
propertyChange
key

 

Scripting Functions

addSelectionInterval(start, end)

 

Adds the options at indexes start through end (inclusive) to the selected options.

Parameters

int start - The first index (stating at 0) to add to the selection.

int end - The last index (stating at 0) to add to the selection.

Returns

nothing

clearSelection()

 

Clears the current selection, making nothing selected.

Parameters

none

Returns

nothing

getSelectedIndices()

 

Returns a list of the selected indices in increasing order. Returns an empty list if nothing is selected.

Parameters

none

Returns

int[]

getSelectedValue()

 

Returns the currently selected value, or None if the selection is empty

Parameters

none

Returns

Object

getSelectedValues()

 

Returns a list of the currently selected values. Returns an empty list if the selection is empty.

Parameters

none

Returns

Object[]

isSelectedIndex(index)

 

Checks whether or not the given index is currently selected.

Parameters

int index

Returns

boolean

isSelectionEmpty()

 

Checks to see if anything is selected in the list or not.

Parameters

none

Returns

boolean

setSelectedValue(value)

 

Sets the currently selected value to the argument, if found in the list.

Parameters

Object value

Returns

nothing