BBjImageCtrl

Description

In BBj 5.00 and higher, the BBjImageCtrl object provides methods for manipulating a GUI image control on a BBj Window. Do not confuse BBjImageCtrl with BBjImage, an image object that can be retrieved from the BBjImageCtrl or using the BBjImageManager. (Prior to BBj 5.0 this object was called BBjImage.)

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjImageCtrl

A BBjImageCtrl object is created through the following BBjWindow method:

Return Value

Method

BBjImageCtrl

addImageCtrl(int ID, number x, number y, number width, number height, BBjImage image)

BBjImageCtrl

addImageCtrl(int ID, number x, number y, number width, number height, BBjImage image, string flags)

BBjImageCtrl

addImageCtrl(int ID, number x, number y, number width, number height, string filename)

BBjImageCtrl

addImageCtrl(int ID, number x, number y, number width, number height, string filename, string flags)

BBjImageCtrl

addImageCtrl(int ID, BBjImage image)

BBjImageCtrl addImageCtrl(int ID, BBjImage image, string flags)
BBjImageCtrl addImageCtrl(int ID, string filename)
BBjImageCtrl addImageCtrl(int ID, string filename, string flags)
BBjImageCtrl addImageCtrl(BBjImage image)
BBjImageCtrl addImageCtrl(BBjImage image, string flags)
BBjImageCtrl addImageCtrl(string filename)

BBjImageCtrl

addImageCtrl(string filename, string flags)

Methods of BBjImageCtrl

Return Value

Method

BBjImage

getImage()

boolean

isDisableable()

void

setDisableable(boolean p_disableable)

void

setImage(BBjImage image!)

Methods of BBjImageCtrl inherited from BBjControl

Events

Callback Code

Object-oriented Event

Read Record Event

Code

ON_MOUSE_ENTER

BBjMouseEnterEvent

Mouse Enter/Exit Event

E

ON_MOUSE_EXIT

BBjMouseExitEvent

Mouse Enter/Exit Event

E

ON_POPUP_REQUEST

BBjPopupRequestEvent

Popup Request Event

r

BUI logoCSS

The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.

The BBjImageCtrl is a simple <img> element. It defines the following CSS style names:

.BBjImageCtrl (the control)

.BBjImageCtrl.bbj-disabled (the control is disabled)

Remarks

By default, the BBjImageCtrl is visually identical when it's enabled or disabled. In BBj 15 and higher, the IMAGECTRL_DISABLEABLE !COMPAT setting can be set to TRUE to change that default, such that a disabled BBjImageCtrl is grayed out like other BBjControls. See also BBjImageCtrl::setDisableable .

Constants and Methods inherited from BBjControl

Example

rem 'Create an image control

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!.addImageCtrl(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

See Also

BBjAPI

BBjSysGui

BBjWindow

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