BBjWindow::addImage

 

In BBj 6.00 and higher, this method is deprecated; use BBjWindow::addImageCtrl.

Description

This method creates an image in the BBjWindow.

Syntax

Return ValueMethod
BBjImageCtrladdImage(int ID, number x, number y, number w, number h, string filename)

Parameters

ParameterDescription

ID

Specifies the Control ID number. It must be an integer between 1 and 32767 and be unique within a given top-level window.

x

Horizontal position of the upper-left corner of the control in current units.

y

Vertical position of the upper-left corner of the control in current units.

w

Width of the control in current units.

h

Height of the control in current units.

filename

The filename of the image to display.

Return Value

Returns the created BBjImage object.

Remarks

None.

Example

rem 'Create an image

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 'Set addWindow param values
X = 10
Y = 10
WIDTH = 200
HEIGHT = 200
TITLE$="BBj Window"

rem 'Set the current context
mySysGui!.setContext(0)

rem 'Create a window
myWindow! = mySysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)

rem 'add the image
myWindow!.addImage(5,10,10,40,40,"bbj40.jpg")

rem 'Register the CALLBACK routines
CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

rem 'Process Events
process_events

rem 'Callback routine called when the user closes the application
window

APP_CLOSE:
release
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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