BBjCheckBox

Creation Path


BBjAPI

|

+--BBjSysGui

|

+--BBjWindow

|

+--BBjCheckBox

Description

The BBjCheckBox object provides methods for manipulating a GUI check box control.

Implemented Interfaces

DropTarget, Editable, Focusable, RecordSetBindable,SimpleRecordSetBindable,TabTraversable, TextAlignable, Validateable

Creation

A BBjCheckBox object is created through the following BBjWindow methods:

Return Value

Method

BBjCheckBox

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

BBjCheckBox

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

BBjCheckBox addCheckBox(int ID, string title)
BBjCheckBox addCheckBox(int ID, string title, String flags)
BBjCheckBox addCheckBox(string title)

BBjCheckBox

addCheckBox(string title, String flags)

Methods of BBjCheckBox

Return Value

Method

int

getHorizontalTextPosition()

boolean

isEditable(int editable)

boolean

isSelected()

void

setEditable(boolean editable)

void

setHorizontalTextPosition(int position)

void

setSelected(boolean selected)

Methods of BBjCheckBox implemented for DropTarget

Return Value

Method

int

getDropActions()

void

setDropActions(int actions)

BBjVector

getDropTypes()

void

setDropTypes(BBjVector types)

Methods of BBjCheckBox implemented for Editable

Return Value

Method

boolean

isEditable()

void

setEditable(boolean p_edit)

Methods of BBjCheckBox implemented for Focusable

Return Value

Method

boolean

isFocusable()

void

setFocusable(boolean p_focus)

Methods of BBjCheckBox implemented for RecordSetBindable

Return Value

Method

void

bindRecordSet(BBjRecordSet recordset, string fieldname)

string

getBoundFieldName()

Methods of BBjCheckBox implemented SimpleRecordSetBindable

Return Value

Method

BBjRecordSet

getBoundRecordSet()

void

unbindRecordSet()

Methods of BBjCheckBox implemented for TabTraversable

Return Value

Method

boolean

isTabTraversable()

void

setTabTraversable(boolean trav)

Methods of BBjCheckBox implemented for TextAlignable

Return Value

Method

int

getAlignment()

void

setAlignment(int p_align)

Methods of BBjCheckbox implemented for Validateable

Return Value

Method

void

accept(boolean valid)

string

getValidationText()

Methods of BBjCheckBox inherited from BBjControl

Events

Callback Code

Object-oriented Event

Read Record Event

Code

ON_CHECK_OFF

BBjCheckOffEvent

Check/Uncheck Event

c

ON_CHECK_ON

BBjCheckOnEvent

Check/Uncheck Event

c

ON_CONTROL_VALIDATION

BBjControlValidationEvent

Control Validation Event

v

ON_DROP_TARGET_DROP

BBjDropTargetDropEvent

Drop Target Drop Event

D

ON_GAINED_FOCUS

BBjGainedFocusEvent

Control Focus Gained/Lost Event

f

ON_LOST_FOCUS

BBjLostFocusEvent

Control Focus Gained/Lost Event

f

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 BBjCheckBox is implemented as an <input type="checkbox"> element with an associated label. It defines the following style names:

.BBjCheckBox

.BBjCheckBox.bbj-checked

.BBjCheckBox.bbj-disabled

.BBjCheckBox.bbj-focused

.BBjCheckBox.bbj-readonly

HTML checkbox and radiobutton elements are notoriously difficult to style.

Remarks

None.

Constants inherited from BBjControl

Example

Rrem ' BBjCheckBox
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(25,25,200,200,"BBjCheckBox",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
cb1! = window!.addCheckBox(101,25,25,150,25,"CheckBox1",$0000$)
cb1!.setCallback(cb1!.ON_CHECK_ON,"event")
cb1!.setCallback(cb1!.ON_CHECK_OFF,"event")
cb2! = window!.addCheckBox(102,25,50,150,25,"CheckBox2",$0000$)
cb2!.setCallback(cb2!.ON_CHECK_ON,"event")
cb2!.setCallback(cb2!.ON_CHECK_OFF,"event")
cb3! = window!.addCheckBox(201,25,100,150,25,"CheckBox3",$0020$)
cb3!.setCallback(cb3!.ON_CHECK_ON,"event")
cb3!.setCallback(cb3!.ON_CHECK_OFF,"event")
cb4! = window!.addCheckBox(202,25,125,150,25,"CheckBox4",$0024$)
cb4!.setCallback(cb4!.ON_CHECK_ON,"event")
cb4!.setCallback(cb4!.ON_CHECK_OFF,"event")
process_events
event:
event! = sysgui!.getLastEvent()
i = msgbox(event!.getCheckBox().getText(),0,event!.getEventName())
return
eoj:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

CHECKBOX Mnemonic - Create Check Box Control BBj

CALLBACK Verb - Register BBj Subroutine

Focusable

RecordSetBindable

TabTraversable

Validateable

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