TrackBarMobile()
Syntax
Result = TrackBarMobile(#Mobile, Min, Max, Step [, Flags])Description
Create a new mobile trackbar in the current container.
Parameters
#Mobile A number to identify the new mobile object. #PB_Any can be used to auto-generate this number. Min The minimum value of the trackbar. Max The maximum value of the trackbar. Step The step between two values. For example if the step is 3 and the minimum value is 0, the available values will be 0, 3, 6, 9, 12 etc. up to the maximum value. Flags (optional) If the current container is a 3 slots container, the following constants can be used to select in which slot the trackbar should be created: #PB_Mobile_Left : The trackbar will be set in the left slot. #PB_Mobile_Center: The trackbar will be set in the center slot. #PB_Mobile_Right : The trackbar will be set in the right slot.
Return value
Returns nonzero on success and zero on failure. If #PB_Any was used as the #Mobile parameter then the return-value is the auto-generated number on success.
Remarks
The following functions can be used to act on the trackbar:
- SetMobileState(): Changes the current value of the trackbar.
- GetMobileState(): Returns the current value of the trackbar.
The following events are supported with EventType():- #PB_EventType_Change: the trackbar value has been changed.
Example
If ContainerMobile(#PB_Any, #PB_Mobile_Page) TrackBarMobile(1, 0, 100, 4) ; We use a step of 4 for the demonstration CloseMobileContainer() EndIf Procedure MobileEvents() Select EventMobile() Case 1 Select EventType() Case #PB_EventType_Change Debug "Trackbar changed: "+GetMobileState(1) EndSelect EndSelect EndProcedure BindEvent(#PB_Event_Mobile, @MobileEvents())
See Also
SetMobileState(), GetMobileState()
Supported OS
All