BBjFormFittedField

Description

In BBj 4.0 and higher, the BBjFormFittedField object allows users to construct a field of monospaced text on a page.

Creation

BBjAPI > BBjPrinter > BBjForm > BBjFormPage > BBjFormFittedField

The BBjFormFittedField object is created through the following BBjFormPage object method:

Return Value

Method

BBjFormFittedField

newFittedField()

BBjFormFittedField

newFittedField(double x, double y, double width, double height)

Methods of BBjFormFittedField

Return Value

Method

font

getFont()

void

setFont(Font font)

void

setText(attributedString text)

void

setText(string text)

BBjColor

getTextColor()

void

setTextColor(BBjColor color)

BBjColor

getBackgroundColor()

void

setBackgroundColor(BBjColor color)

Methods of BBjFormFittedField inherited from BBjFormElement

Return Value

Method

void

add(BBjFormElement object)

double

getBottomMargin()

point

getDrawingOrigin()

dimension

getDrawingSize()

double

getDrawingHeight()

double

getDrawingWidth()

double

getDrawingX()

double

getDrawingY()

double

getHeight()

int

getHorizontalSticky()

double

getLeftMargin()

BBjFormPage

getPage()

BBjFormElement

getParent()

point

getPosition()

double

getRightMargin()

dimension

getSize()

double

getTopMargin()

int

getVerticalSticky()

double

getWidth()

double

getX()

double

getY()

int

isChild()

int

isHorizontalFill()

int

isVerticalFill()

void

remove(BBjFormElement object)

void

setBottomMargin(double margin)

void

setHeight(double height)

void

setHorizontalFill(int fill)

void

setHorizontalSticky(int sticky)

void

setLeftMargin(double margin)

void

setPosition(double x, double y)

void

setPosition(Point point)

void

setRelative(int relative)

void

setRightMargin(double margin)

void

setSize(double width, double height)

void

setSize(dimension size)

void

setTopMargin(double margin)

void

setVerticalFill(int fill)

void

setVerticalSticky(int sticky)

void

setWidth(double width)

Remarks

This form element will equally space the characters of its text in order to horizontally fill the available width.

Example

REM Get a new paragraph

REM Obtain the instance to the BBjAPI object
myAPI!=BBjAPI()

REM Obtain an instance of a default BBjPrinter object
LET myBBjPrinter!=myAPI!.getBBjPrinter(0)

REM Get BBjForm for the selected printer
LET myBBjForm!=myBBjPrinter!.getForm(1)

REM Get a new page
LET myBBjFormPage!=myBBjForm!.createPage()

REM Get a new paragraph
LET para!=myBBjFormPage!.newFittedField()

RELEASE

See Also

BBjAPI

BBj Object Variables

BBj Object Assignment

BBj Object Error Handling

BBj Object Operators

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