Codecore Logo
Quick Search
»
Advanced Search »

Touch Screen PagedList Control

RSS
The paged list control contains a list of name/value pairs, with multiple items of the list being shown vertically. The selected item's name is highlighted in the control. The currently displayed page can be changed by invoking the NextPage() and PreviousPage() methods of the control, which is usually done by other button controls on the touch screen. Items must be programatically added to the control from a script using the control's Add() or Insert() methods, from the OnLoad action script for example. The currently selected value can be referenced using the 'SelectedValue' property, ex: TouchScreen.MyPagedList.SelectedValue

Left

A Number representing the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

Changes made to the Width and Left property values cause the Right property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Left;

TouchScreen.myControl.Left = 100;

Right

A Number representing the distance, in pixels, between the right edge of the control and the left edge of its container's client area.

The value of the Right property is equal to the sum of the Left property value and the Width property value.

The Right property is read-only. You can change this property value indirectly by changing the value of the Left or Width properties

Type: Number

Example:


x = TouchScreen.myControl.Right;

Top

A Number representing the distance, in pixels, between the top edge of the control and the top edge of its container's client area.

Changes made to the Height and Top property values cause the Cottom property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Top;

TouchScreen.myControl.Top = 100;

Bottom

A Number representing the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

The value of the Bottom property is equal to the sum of the Top property value and the Height property value.

The Bottom property is read-only. You can change this property value indirectly by changing the value of the Right or Height properties

Type: Number

Example:


x = TouchScreen.myControl.Bottom;

Height

The height of the control in pixels.

Changes made to the Height and Top property values cause the Bottom property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Height;

TouchScreen.myControl.Height = 100;

Width

The width of the control in pixels.

Changes made to the Width and Left property values cause the Right property value of the control to change.

Type: Number

Example:


x = TouchScreen.myControl.Width;

TouchScreen.myControl.Width = 100;

Visible

A value indicating whether the control (and all its child controls if applicable) are displayed.

Type: Boolean

Example:


x = TouchScreen.myControl.Visible;

TouchScreen.myControl.Visible = false; // hide the control

Refresh()

Refreshes the control by updating any values such as text, etc.

Syntax:

void Refresh( )

Example:

TouchScreen.myControl.Refresh();


PageCount

Gets the number of pages.

Type: Number

Example:


x = TouchScreen.myControl.PageCount;

CurrentPage

Gets the current page index, zero based.

Type: Number

Example:


x = TouchScreen.myControl.CurrentPage;

Count

The number of items in the list.

Type: Number

Example:


x = TouchScreen.myControl.Count;

SelectedText

The selected text.

Type: Number

Example:


x = TouchScreen.myControl.SelectedText;

SelectedValue

Gets the value associated with the selected text.

Type: ScriptNumber

Example:


x = TouchScreen.myControl.SelectedValue;

SelectedIndex

The selected index. Will be -1 when there are no items in the list.

Type: ScriptNumber

Example:


x = TouchScreen.myControl.SelectedIndex;

HighlightSelection

Indicates if the selected items should be highlighted.

Type: ScriptNumber

Example:


x = TouchScreen.myControl.HighlightSelection;

Add

Adds a name/value pair to the end of the list.

Syntax:

void Add(String text, Object value)

Parameters:

text: The display text to show when this item is selected.
value: The value associated with the display text.

Example:


TouchScreen.myControl.Add( "My Item Title", 8 );
TouchScreen.myControl.Add( "Second Item", "the value" );

Insert

Adds a string to the end of the list.

Syntax:

void Insert(Number index, String text, Object value)

Parameters:

index: The zero-based index at which the item should be inserted.
text: The display text to show when this item is selected.
value: The value associated with the display text.

Example:


TouchScreen.myControl.Insert( 7, "My Item Title", 8 );
TouchScreen.myControl.Insert( 8, "Another Item", "the value" );

Remove

Removes the string at the specified index of the list.

Syntax:

void Remove( Number index )

Parameters:

index: The zero-based index of the string to remove.

Example:

TouchScreen.myControl.Remove( 2 ); // remove the 3rd item in the list

Clear

Removed all the elements in the list.

Syntax:

void Clear( )

Example:

TouchScreen.myControl.Clear( );

ContainsText

Determines whether the text is in the list.

Syntax:

Boolean Contains( String text)

Parameters:

index: The zero-based index of the string to remove.

Example:

isThere = TouchScreen.myControl.Contains( My Item Title );

PreviousPage

Cycles the displayed page the previous page.

Syntax:

void PreviousPage( )

Example:

TouchScreen.myControl.PreviousPage( );

NextPage

Cycles the displayed page to the next page.

Syntax:

void NextPage( )

Example:

TouchScreen.myControl.NextPage( );

SelectPrevious

Cycles the selected item to the previous item in the list.

Syntax:

void SelectPrevious( )

Example:

TouchScreen.myControl.SelectPrevious( );

SelectNext

Cycles the selected item to the next item in the list.

Syntax:

void SelectNext( )

Example:

TouchScreen.myControl.SelectNext( );

Privacy Policy | Conditions Of Use

Copyright ©2014 Codecore Technologies, All rights reserved.