Back

CreateListView

ListView creates a full screen view to display a list in the app.

app.CreateListView( list, title, options ) -> app object - ListView

Example - Example



function OnStart()
{
    lvw = app.CreateListView( "Mon,Tues,Wed,Thurs,Fri,Sat,Sun", "Days" );
    lvw.SetOnTouch( lvw_OnTouch );
    lvw.Show();
}

function lvw_OnTouch( item )
{
    app.ShowPopup( item );
}
    Copy     Copy All       Run      

The following methods are avaiable on the ListView object:

  Destroy()
  Explode()
  Focus()
  GetAbsHeight() -> number - integer
  GetAbsWidth() -> number - integer
  GetHeight( options ) -> number - fraction of screen height
  GetLeft( options ) -> number - fraction of screen width
  GetPosition( options ) -> object - { left: fraction of parent width, top: fraction of parent height, right: fraction of parent width, bottom: fraction of parent height }
  GetTop( options ) -> number - fraction of screen height
  GetType() -> string - "ListView"
  GetVisibility() -> string - "Show" or "Hide" or "Gone"
  GetWidth( options ) -> number - fraction of screen width
  Gone()
  Hide()
  IsEnabled() -> boolean
  IsOverlap( obj, depth ) -> boolean
  IsVisible() -> boolean
  Release()
  SetScale( x, y )
  Show()
  id -> string - "#id"

string
unknown
number
set color effects
?
destroys object
destroys object with explode animation and sound
?
get height in pixels
get width in pixels
get screen relative height
get distance to left parent border
get distance to upper parent border
GetVisibility
get screen relative width
Set visibility "Gone"
Set visibility "Hide"
IsEnabled
app object
number - fraction of screen width
return wether obj overlap with an other
IsVisible
?
string -
  hexadecimal: "#rrggbb", "#aarrggbb"
  colourName: "red", "green", ...
SetBackColor
number - fraction of screen height
SetBackColorRadial
string - path to file or folder ( "/absolute/..." or "relative/..." )
changes the background image
string - "Add" or "Multiply" or "?"
adjust color
boolean
en/disable object
move object from current position
function()
called when user touches object
set surrounding borders
SetPosition
number - factor
SetScale
change object size
string - "Show" or "Hide" or "Gone"
change visibility mode
Set visibility "Show"
?
object id