GetMobileAttribute()

Syntax

String$ = GetMobileAttribute(#Mobile, Attribute$ [, Item])
Description
Returns the attribute of the specified mobile object.

Parameters

#Mobile The mobile object to use.
Attribute$ The attribute to get. Raw HTML attribute can be specified as well (for example: "style", "value" etc.).
Item (optional) The mobile gadget item to get the attribute. It only works with TabBarMobile() for now.

Return value

Returns the attribute of the specified mobile object.

Example

  If ContainerMobile(#PB_Any, #PB_Mobile_Page)
    
    ButtonMobile(0, "Hello World")
    SetMobileAttribute(0, "style", "margin:50px;") ; Set a 50px margin around the button
    Debug GetMobileAttribute(0, "style")
    
    CloseMobileContainer()
  EndIf

See Also

SetMobileAttribute()

Supported OS

All

<- FreeMobile() - Mobile Index - GetMobileState() ->