BBjImageManager::loadImageFromImageList

Description

In BBj 5.0 and higher, this method loads a BBjImage object from an image list.

Syntax

Return Value

Method

BBjImage

loadImageFromImageList(int id, int index)

Parameters

Variable

Description

id

Image list ID.

index

Zero-based index of the image to be loaded.

Return Value

Returns the image as a BBjImage object.

Remarks

None.

Example

REM Load a BBjImage from an imagelist

REM Obtain the instance of the BBjAPI object
LET myAPI!=BBjAPI()

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

REM Obtain the instance of the BBjSysGui object
LET mySysGui!=myAPI!.getSysGui()

REM Obtain the instance of the Image Manager object
LET myImageManager!=mySysGui!.getImageManager()

REM Get the image from a file
LET myImage!=myImageManager!.loadImageFromFile("updown.bmp")

REM Create the imagelist
LET id=1
LET width=8
mySysGui!.addImageList(id,width,myImage!)

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

REM Load an image from a file
myImage! = myImageManager!.loadImageFromImageList(id,0)

See Also

BBjAPI

BBjSysGui

BBjImageManager

BBjImage

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