This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
built_in:seekbars [2015/01/07 09:50] octazid [Methods] |
built_in:seekbars [2016/09/19 02:18] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Seekbars ====== | ====== Seekbars ====== | ||
- | ===== Create | + | |
- | Create SeekBars using the CreateSeekBar method of the app object: | + | // |
+ | |||
+ | ===== Description | ||
+ | Create SeekBars using the **CreateSeekBar** method of the **[[built_in: | ||
< | < | ||
- | The SetRange method of the SeekBar object to sets the value range of the SeekBar and the SetValue method sets the current value. | + | 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 ' | ||
+ | |||
+ | ====Example==== | ||
+ | <code javascript> | ||
+ | function OnStart() | ||
+ | { | ||
+ | lay = app.CreateLayout( " | ||
+ | |||
+ | 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 ); | ||
+ | } | ||
+ | </ | ||
- | 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 ' | ||
===== Methods ===== | ===== Methods ===== | ||
Some controls use the same methods.\\ | Some controls use the same methods.\\ | ||
For examples of the **[[same methods]]** look here. | For examples of the **[[same methods]]** look here. | ||
- | ^Method ^Description ^ | + | ^ Method |
- | |SeekBar.Destroy() | | | + | | SeekBar.Destroy() |
- | |SeekBar.GetAbsHeight() | | | + | | SeekBar.GetAbsHeight() |
- | |SeekBar.GetAbsWidth() | | | + | | SeekBar.GetAbsWidth() |
- | |SeekBar.GetHeight() | | | + | | SeekBar.GetHeight() |
- | |SeekBar.GetPosition() | | | + | | SeekBar.GetPosition() |
- | |SeekBar.GetType() | | | + | | SeekBar.GetType() |
- | |SeekBar.GetValue() | | | + | | SeekBar.GetValue() |
- | |SeekBar.GetVisibility() | | | + | | SeekBar.GetVisibility() |
- | |SeekBar.GetWidth() | | | + | | SeekBar.GetWidth() |
- | |SeekBar.Release() | | | + | | SeekBar.Release() |
- | |SeekBar.SetBackColor( | + | | SeekBar.SetBackColor( |
- | |SeekBar.SetBackGradient( | + | | SeekBar.SetBackGradient( |
- | |SeekBar.SetBackGradientRadial( | + | | SeekBar.SetBackGradientRadial( |
- | |SeekBar.SetBackground( | + | | SeekBar.SetBackground( |
- | |SeekBar.SetMargins( left, | + | | SeekBar.SetMargins( left, |
- | |SeekBar.SetMaxRate( | + | | SeekBar.SetMaxRate( |
- | |SeekBar.SetOnTouch( callback ) | | | + | | SeekBar.SetOnTouch( callback ) | | |
- | |SeekBar.SetPadding( | + | | SeekBar.SetPadding( |
- | |SeekBar.SetPosition( | + | | SeekBar.SetPosition( |
- | |SeekBar.SetRange( | + | | SeekBar.SetRange( |
- | |SeekBar.SetScale( x,y ) | | | + | | SeekBar.SetScale( x,y ) |
- | |SeekBar.SetSize( | + | | SeekBar.SetSize( |
- | |SeekBar.SetValue( | + | | SeekBar.SetValue( |
- | |SeekBar.SetVisibility( | + | | SeekBar.SetVisibility( |
+ | |||
+ | =====Sample===== | ||
+ | [[tips_tricks: |