TextMobile()
Syntax
Result = TextMobile(#Mobile, Text$ [, Flags])Description
Create a mobile text in the current container.
Parameters
#Mobile A number to identify the new mobile object. #PB_Any can be used to auto-generate this number. Text$ The text to display. Flags (optional) If the current container is a 3 slots container, the following constants can be used to select in which slot the text should be created: #PB_Mobile_Left : The text will be set in the left slot. #PB_Mobile_Center: The text will be set in the center slot. #PB_Mobile_Right : The text 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 text:
- SetMobileText(): Changes the text.
- GetMobileText(): Returns the text.
Example
If ContainerMobile(#PB_Any, #PB_Mobile_Page, "margin:8px")
TextMobile(0, "Hello World !")
EndIf
Example: With a 3 slot container
If ContainerMobile(#PB_Any, #PB_Mobile_Page, "margin:8px")
If ContainerMobile(#PB_Any, #PB_Mobile_Row) ; A row is a 3 slot container
TextMobile(0, "Left", #PB_Mobile_Left)
TextMobile(1, "Center", #PB_Mobile_Center)
TextMobile(2, "Right", #PB_Mobile_Right)
EndIf
CloseMobileContainer()
EndIf
See Also
SetMobileText(), GetMobileText()
Supported OS
All