BBjImage

Description

In BBj 5.0 and higher, use the BBjImage object to manipulate images on BBjButton, BBjToolButton, BBjTabCtrl, and BBjTopLevelWindow objects. Do not confuse the BBjImage object with the BBjImageCtrl control, which places an image on a window (BBjImageCtrl is now the object known prior to BBj 5.0 as BBjImage).

Creation

BBjAPIBBjSysGuiBBjImageManager > BBjImage

Create a BBjImage object using one of the following BBjImageManager methods:

Return Value

Method

BBjImage

loadImageFromBytes(string binary)

BBjImage

loadImageFromClientJar(string filename)

BBjImage

loadImageFromClientURL(string url)

BBjImage

loadImageFromFile(string filename)

BBjImage

loadImageFromFile(string filename, int index)

BBjImage

loadImageFromImageList(int id, int index)

BBjImage

loadImageFromServerJar(string filename)

BBjImage

loadImageFromServerURL(string url)

BBjImage

loadImageFromURL(string url)

Methods of BBjImage

Return Value

Method

string

getBytes(string format)

int

getHeight()

int

getWidth()

BBjImage

getImageSlice(int index, int width)

boolean

isValid()

Remarks

None.

Constants

None.

Example

rem ' BBjImage Example

rem ' Load a BBjImage from a file
rem 'Obtain the instance of the BBjAPI object
let myAPI!=BBjAPI()

rem 'Open the SysGui device
SYSGUI=UNT
OPEN (SYSGUI)"X0"

rem 'Obtain an instance of the BBjSysGui object
let mySysGui!=myAPI!.getSysGui()

rem 'Obtain an instance of the BBjImageManager object
myImageManager! = mySysGui!.getImageManager()

rem 'Load an image from a file
myImage! = myImageManager!.loadImageFromFile("bbj.ico")

See Also

BBjAPI

BBjSysGui

BBj Object Variables

BBj Object Creation and Assignment

BBj Object Error Handling

BBj Object Operators

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.