BBjImageCtrl

Creation Path


BBjAPI

|

+--BBjSysGui

|

+--BBjWindow

|

+--BBjImageCtrl

 

Description

In BBj 5.0 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

A BBjImageCtrl object is created through the following BBjWindow method:

 

Return Value

Method

BBjImageCtrl

addImage(int ID, int x, int y, int width, int height, string filename) deprecated, use addImageCtrl

BBjImageCtrl

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

BBjImageCtrl

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

BBjImageCtrl

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

BBjImageCtrl

addImageCtrl(int ID, int x, int y, int width, int height, 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

CSS

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.



______________________________________________________________________________________

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