BBjStaticText

Creation Path


BBjAPI

|

+--BBjSysGui

|

+--BBjWindow

|

+--BBjStaticText

 

Description

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

Implemented Interfaces

RecordSetBindable, SimpleRecordSetBindable, TextAlignable

Creation

A BBjStaticText object is created through the following BBjWindow methods:

Return Value

Method

BBjStaticText

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

BBjStaticText

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

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 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
RETURN

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.



______________________________________________________________________________________

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