Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added JS equivalent

...

...

...

...


Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px

Insert excerpt
BrightScript Version Navigation Menu
BrightScript Version Navigation Menu
nopaneltrue
This object can be used in place of roImagePlayer in cases where the image is displayed within a rectangle. Using an roImageWidget can result in more pleasing aesthetics for image player creation; it can also be used to display images in a multi-screen array. Beyond this, roImageWidget behaves identically to roImagePlayer.  The JavaScript equivalent is the <img> tag in HTML.

Object Creation: The image widget area is generated using an roRectangle object.

Code Block
rectangle = CreateObject("roRectangle", 0, 0, 1024, 768)
i = CreateObject("roImageWidget", rectangle)

ifImageControl 

DisplayFile(image_filename As String) As Boolean

...

Code Block
i=CreateObject("roImageWidget")
a=CreateObject("roAssociativeArray")
a["Filename"] = "test.jpg"
a["Mode"] = 1
a["Transition"] = 14
a["MultiscreenWidth"] = 3
a["MultiscreenHeight"] = 2
a["MultiscreenX"] = 0
a["MultiscreenY"] = 0
i.PreloadFile(a)
i.DisplayPreload

 


The filename, mode, and transition values are the same as those documented for the DisplayFile() and PreloadFile() methods above. The MultiscreenWidth and MultiscreenHeight parameters specify the width and height of the multi-screen matrix. For example, 3x2 would be three screens wide and two screens high. The MultiscreenX and MultiscreenY specify the position of the current screen within that matrix.

...

  • Mode = 0
  • Transition = 0
  • MultiscreenWidth = 1
  • MultiscreenHeight = 1
  • MultiscreenX = 0
  • MultiscreenY = 0

...


This code uses DisplayFile() to display a portion of an image:

...