BBjImage

Creation Path


BBjAPI

|

+--BBjSysGui

|

+--BBjImageManager

|

+--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

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

Return Value

Method

BBjImage

loadImageFromBytes(string binary)

BBjImage

loadImageFromClientJar(string filename)

BBjImage

loadImageFromFile(string filename)

BBjImage

loadImageFromImageList(int id, int index)

BBjImage

loadImageFromServerJar(string filename)

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 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 Assignment

BBj Object Error Handling

BBj Object Operators

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



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.