BBjGroupBox

Creation Path


BBjAPI

|

+--BBjSysGui

|

+--BBjWindow

|

+--BBjGroupBox

 

Description

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

Creation

A BBjGroupBox object is created through the following BBjWindow methods:

Return Value

Method

BBjGroupBox

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

BBjGroupBox

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

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.