BBjStaticText

Description

The BBjStaticText object provides methods for manipulating a GUI static text control.

Implemented Interfaces

RecordSetBindable,SimpleRecordSetBindable,TextAlignable

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjStaticText

A BBjStaticText object is created through the following BBjWindow methods:

Return Value

Method

BBjStaticText

addStaticText(int ID, number x, number y, number width, number height, string title)

BBjStaticText

addStaticText(int ID, number x, number y, number width, number height, string title, string flags)

BBjStaticText

addStaticText(int ID, string title)

BBjStaticText

addStaticText(int ID, string title, string flags)

BBjStaticText

addStaticText(string title)

BBjStaticText

addStaticText(string title, string flags)

Methods of BBjStaticText

Return Value

Method

int

getBottomMargin()

int

getLeftMargin()

boolean

getLineWrap()

int

getRightMargin()

int

getTopMargin()

void

setBottomMargin(int margin)

void

setLeftMargin(int margin)

void

setLineWrap(boolean wrap)

void

setRightMargin(int margin)

void

setTopMargin(int margin)

Methods of BBjStaticText implemented for RecordSetBindable

Return Value Method
void bindRecordSet(BBjRecordSet recordset!, string fieldname)
string getBoundFieldName()

Methods of BBjStaticText implemented for SimpleRecordSetBindable

Return Value Method
BBjRecordSet getBoundRecordSet()
void unbindRecordSet()

Methods of BBjStaticText implemented for TextAlignable

Return Value Method
int getAlignment()
void setAlignment(int align)

Methods of BBjStaticText 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

ON_RIGHT_MOUSE_DOWN

BBjRightMouseDownEvent

Right Mouse Button Down 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 BBjStaticText control is a simple HTML <div> element. It defines the following style names:

.BBjStaticText

.BBjStaticText.bbj-disabled

Remarks

None.

Constants inherited from BBjControl

Example

rem 'Add a static text control to a window

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 a static text control on the window
myStaticText! = myWindow!.addStaticText(101,50,100,90,30,"Static Text",$0000$)

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

TEXT Mnemonic - Create a Static Text Control

CALLBACK Verb - Register BBj Subroutine

RecordSetBindable

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