ImageMobile()

Syntax

Result = ImageMobile(#Mobile, ImageID [, Flags])
Description
Create a new mobile image in the current container.

Parameters

#Mobile A number to identify the new mobile object. #PB_Any can be used to auto-generate this number.
ImageID The image to display. A valid image identifier can be retrieved with ImageID().
Flags (optional) If the current container is a 3 slots container, the following constants can be used to select in which slot the image should be created:
  #PB_Mobile_Left  : The image will be set in the left slot.
  #PB_Mobile_Center: The image will be set in the center slot.
  #PB_Mobile_Right : The image 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 image:

- SetMobileState(): Changes the current image. A valid image identifier can be retrieved with ImageID().

The following events are supported with EventType():
  - #PB_EventType_LeftClick: the image has been clicked.

Example

  If ContainerMobile(#PB_Any, #PB_Mobile_Page)
    CreateImage(0, 150, 50, 24, RGB(255, 0, 0))
    ImageMobile(#PB_Any, ImageID(0))
    
    CloseMobileContainer()
  EndIf

See Also

SetMobileState(), GetMobileState()

Supported OS

All

<- IconMobile() - Mobile Index - InputMobile() ->