Create SeekBars using the CreateSeekBar method of the app object:
skb = app.CreateSeekBar( width, height );
The SetRange method of the SeekBar object to sets the value range of the SeekBar and the SetValue method
sets the current value.
Use the SetOnTouch method of the SeekBar object to set the name of a function you want to be called when the SeekBar is touched.
You can read the 'value' parameter in your callback function to get the position value of the SeekBar
Example
function OnStart()
{
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
skb = app.CreateSeekBar( 0.8 );
skb.SetRange( 1.0 );
skb.SetValue( 0.5 );
skb.SetOnTouch( skb_OnTouch );
lay.AddChild( skb );
app.AddLayout( lay );
}
function skb_OnTouch( value )
{
app.ShowPopup( "Value = " + value );
}
The following methods are avaiable on the SeekBar object:
SetVisibility( visibility )
GetVisibility()
SetPadding( left, top, right, bottom )
SetMargins( left, top, right, bottom )
SetPosition( left, top, width, height )
SetSize( width, height )
GetWidth()
GetHeight()
SetOnClick( callback )
GetValue()
SetValue( value )
SetRange( range )
SetMaxRate( ms )