BBjChildWindow

Description

The BBjChildWindow is a child window that must be created within a BBjWindow. The window that the child window is created in will be the child's parent window. BBjChildWindow extends from BBjWindow and implements methods within BBjWindow and BBjControl.

See Child Windows for an introduction to child windows.

Implemented Interfaces

MouseWheelEnabled

TabTraversable (BBj 15.00 and higher)

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjChildWindow

A BBjChildWindow object is created through the following BBjWindow methods:

Return Value

Method

BBjChildWindow

addChildWindow(int ID, number x, number y, number w, number h, int context)

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

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

addChildWindow(int ID, number x, number y, number w, number h, string title, string flags, int context, string eventMask)

addChildWindow(int ID, int context)

addChildWindow(int ID, string title, int context)

addChildWindow(int ID, string title, String flags, int context)

addChildWindow(int ID, string title, String flags, int context, string eventMask)

addChildWindow(int context)

addChildWindow(string title, int context)

addChildWindow(string title, String flags, int context)

addChildWindow(string title, String flags, int context, string eventMask)

Creation Flags

Flag Description

$00000004$

Horizontal Scrollbar: Causes a horizontal scroll bar to appear whenever the window is resized to be smaller than its initial size and setTrack(0) is specified.

$00000008$

Vertical Scrollbar: Causes a vertical scroll bar to appear whenever the window is resized to be smaller than its initial size and setTrack(0) is specified.

$00000010$

Invisible: Sets the child window to be initially invisible.

$00000020$

Disabled: Sets the child window to be initially disabled.

$00000800$

Borderless: Creates a child window without a border.

$00001000$

Fieldset Element: In BBj 22.00 and higher, if creation flag $00008000$ is also specified, the simple child window is created as a fieldset element to emulate groupbox functionality. The default implementation uses a div element. This option is only meaningful in the DWC client.

$00008000$

Simple: In BBj 22.00 and higher, creates a simple child window that doesn't support a status bar or internal docked child windows. This option is only meaningful in the DWC client.

$00010000$

Keyboard Navigation: Activates keyboard navigation in the child window. If this flag is specified, key pressed ("t") events for arrow keys and the tab key will not be reported.

$00100000$

Automatic Layout: Automatically arranges all controls to fit within the child window. In the DWC client, this flag causes the window to use dynamic flow layout, ignoring all absolute control sizes and positions.

DWC logoNote:

When creating a child window through an ARC file in WindowBuilder, this flag is not currently exposed in the UI, and corresponds to the "GRAVITY" flag. To enable flow layout in the DWC, add a line with the keyword GRAVITY to the ARC source file in the section with the child window properties.

$00200000$

Docking: Attaches the child window to one side of the parent frame, by default to the top frame. It will always occupy the full extent of the parent window's edge (even if the parent is resized later), but the other dimension is determined by the width or height specified when the child was created. By default, docked child windows are attached to the top of their parent. This can be changed with the 'DOCK' mnemonic.

$00800000$

Enter as Tab: Sets the Enter key to behave as a Tab key.

$01000000$

Recessed Edge: Draws a recessed client edge around the child window.

$02000000$

Raised Edge: Draws a raised edge around the child window.

$08000000$

Unique Names: In BBj 8.00 and higher, causes the window to enforce unique control names. See BBjWindow::getControl.

$10000000$

Mouse Events: In BBj 15.00 and higher, causes the window to report all mouse events for all controls.

$20000000$

Keypress Events: In BBj 15.00 and higher, causes the window to report all keypress events for all controls.

$80000000$

TRACK'(0)': In BBj 17.00 and higher, creates the window with 'TRACK'(0) instead of the default 'TRACK'(1). Use this option to enable scrolling behavior in the child window.

Methods of BBjChildWindow

Return Value

Method

BBjColor

getBorderColor()

int

getDockLocation()

BBjWindow

getParentWindow()

void

setBorderColor(BBjColor color!)

void

setDockLocation(int dock)

Methods of BBjChildWindow implemented for MouseWheelEnabled

Return Value Method

int

getScrollWheelBehavior()

void

setScrollWheelBehavior(int mode)

Methods of BBjChildWindow implemented for TabTraversable

Return Value Method

boolean

isTabTraversable()

void

setTabTraversable(boolean trav)

Methods of BBjChildWindow inherited from BBjWindow

Methods of BBjChildWindow inherited from BBjControl

Events

Callback Code

Object-oriented Event

Read Record Event

Code

ON_DOUBLE_CLICK

BBjDoubleClickEvent

Mouse Double-Click

2

ON_KEYPRESS

BBjKeypressEvent

Keypress

t

ON_MOUSE_DOWN

BBjMouseDownEvent

Mouse Button Down

d

ON_MOUSE_ENTER

BBjMouseEnterEvent

Mouse Enter/Exit Event

E

ON_MOUSE_EXIT

BBjMouseExitEvent

Mouse Enter/Exit Event

E

ON_MOUSE_MOVE

BBjMouseMoveEvent

Mouse Move

m

ON_MOUSE_SCROLL

BBjScrollWheelEvent

Mouse Scroll Wheel

w

ON_MOUSE_UP

BBjMouseUpEvent

Mouse Button Up

u

ON_RESIZE (BBj 22 and higher)

BBjResizeEvent Window Resize S

ON_RIGHT_MOUSE_DOWN

BBjRightMouseDownEvent

Right Mouse Button Down Event

R

ON_POPUP_REQUEST

BBjPopupRequestEvent

Popup Request Event

r

ON_WINDOW_GAINED_FOCUS

BBjWindowGainedFocusEvent

Window Focus Gained/Lost Event

F

ON_WINDOW_LOST_FOCUS

BBjWindowLostFocusEvent

Window Focus Gained/Lost Event

F

ON_WINDOW_SCROLL

BBjWindowScrollEvent

Scrollbar Move Event

p

BUI logoCSS

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 BBjChildWindow defines the following style names:

.BBjChildWindow

.BBjChildWindow-border

BBjChildWindows have a default 1px black border, which can be omitted when the control is created. That border color can be changed with the following CSS:

.BBjChildWindow-border
{
  background-color: gray;  
}

Constants

None.

Example

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,175,125,"BBjChildWindow",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
child_border! = window!.addChildWindow(101,25,25,50,50,"",$$,1,$$)
child_border!.setBorderColor(sysgui!.makeColor(0,0,255))
child_noborder! = window!.addChildWindow(102,100,25,50,50,"",$00000800$,2,$$)
child_noborder!.setBackColor(sysgui!.makeColor(255,255,0))

process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

MouseWheelEnabled

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