BBjGroupBox

Description

The BBjGroupBox object provides methods for manipulating a GUI group box control.

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjGroupBox

A BBjGroupBox object is created through the following BBjWindow methods:

Return Value

Method

BBjGroupBox

addGroupBox(int ID, number x, number y, number w, number h, string title)

BBjGroupBox

addGroupBox(int ID, number x, number y, number w, number h, string title, string flags)

BBjGroupBox

addGroupBox(int ID, String title)

BBjGroupBox

addGroupBox(int ID, String title, String flags)

BBjGroupBox

addGroupBox(String title)

BBjGroupBox

addGroupBox(String title, String flags)

Methods of BBjGroupBox inherited from BBjControl

Events

Callback Code

Object-oriented Event

Read Record Event

Code

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 BBjGroupBox is implemented as a <fieldset> element; the text is a <legend> element. Here's a very simple groupbox:

sysgui = unt

open (sysgui)"X0"

sysgui! = bbjapi().getSysGui()

window! = sysgui!.addWindow(25,25,300,100,"GroupBox",$00090003$)

window!.setCallback(window!.ON_CLOSE,"eoj")

groupbox! = window!.addGroupBox(101,25,25,250,50,"GroupBox",$$)

process_events

eoj:

release

By default, it looks like this:

The BBjGroupBox defines the following style names:

.BBjGroupBox (the primary style name)

.BBjGroupBox.bbj-disabled (the element is disabled)

.BBjGroupBox legend (the title)

The following sample CSS makes the BBjGroupBox border and text green and moves the text to the middle, with a box around it.

.BBjGroupBox

{

    border: 1px solid green;

    border-radius: 10px;

}

.BBjGroupBox legend

{

    border: 1px solid green;

    color: green;

    text-align: center;

    font-weight: bold;

}

Remarks

None.

Constants inherited from BBjControl

Example

rem 'Add a group box 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 group box control on the window
myGroupBox! = myWindow!.addGroupBox(101,10,30,150,80,"Group Box")

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

GROUPBOX Mnemonic - Create a Group Box Control

CALLBACK Verb - Register BBj Subroutine

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