BBjScrollBar
Description
The BBjScrollBar object provides methods for manipulating a GUI scroll bar control.
Note: The BBjScrollBar is a standalone BBjControl that should not be confused with scroll bars that can be created with optional flags on windows, child windows, or edit-type controls.
To enable scrolling behavior in a window, horizontal or vertical scrollbars must be enabled and tracking must be turned off. Use the window creation flags $00000004$ (horizontal scrolling) or $00000008$ (vertical scrolling), and set tracking to 0 with window creation flag $80000000$
, BBjWindow::setTrack, or the TRACK Mnemonic - Toggle Tracking On/Off (SYSGUI).
Implemented Interfaces
DropTarget, Focusable, MouseWheelEnabled, TabTraversable
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjScrollBar
A BBjScrollBar object is created through the following BBjWindow methods:
Return Value |
Method |
---|---|
addHorizontalScrollBar() | |
addHorizontalScrollBar(int ID) |
|
addHorizontalScrollBar(int ID, number x, number y, number width, number height) |
|
addHorizontalScrollBar( int ID, number x, number y, number width, number height, string flags) |
|
addHorizontalScrollBar(int ID, string flags) |
|
BBjScrollBar |
addHorizontalScrollBar(string flags) |
BBjScrollBar | addVerticalScrollBar() |
BBjScrollBar | addVerticalScrollBar(int ID) |
BBjScrollBar | addVerticalScrollBar(int ID, number x, number y, number width, number height) |
BBjScrollBar | addVerticalScrollBar(int ID, number x, number y, number width, number height, string flags) |
BBjScrollBar | addVerticalScrollBar(int ID, string flags) |
addVerticalScrollBar(string flags) |
Methods of BBjScrollBar
Return Value |
Method |
int |
|
int |
|
int |
|
int |
|
int |
|
void |
setBlockIncrement(int block) |
void |
setScrollPosition(int pos) |
void |
setScrollProp(int prop) |
void |
setScrollRange(int min, int max) |
Methods of BBjScrollBar implemented for DropTarget
Return Value | Method |
---|---|
int | getDropActions() |
void | setDropActions(int actions) |
BBjVector | getDropTypes() |
void | setDropTypes(BBjVector types) |
Methods of BBjScrollBar implemented for Focusable
Return Value | Method |
---|---|
boolean | isFocusable() |
void | setFocusable(boolean focus) |
Methods of BBjScrollBar implemented for MouseWheelEnabled
Return Value | Method |
---|---|
int | getScrollWheelBehavior() |
void | setScrollWheelBehavior(int trav) |
Methods of BBjScrollBar implemented for TabTraversable
Return Value | Method |
---|---|
boolean | isTabTraversable() |
void | setTabTraversable(boolean trav) |
Methods of BBjScrollBar inherited from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
---|---|---|---|
ON_CONTROL_SCROLL |
p |
||
ON_DROP_TARGET_DROP |
D |
||
ON_GAINED_FOCUS |
f |
||
ON_LOST_FOCUS |
f |
||
ON_MOUSE_ENTER |
E |
||
ON_MOUSE_EXIT |
E |
||
ON_POPUP_REQUEST |
r |
||
ON_RIGHT_MOUSE_DOWN |
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 BUI BBjScrollBar defines the following style names:
.BBjScrollBar
.BBjScrollBar.bbj-disabled
.BBjScrollBar.bbj-horizontal
.BBjScrollBar.bbj-vertical
.BBjScrollBar.thumb
.BBjScrollBar.horizontal-thumb
.BBjScrollBar-vertical-thumb
.BBjScrollBar-internal
.BBjScrollBar-horizontal-internal
.BBjScrollBar-vertical-internal
.BBjScrollBar-adjusting .BBjScrollBar-thumb
Remarks
In BBj 15.00 and higher, BUI implements two different versions of the BBjScrollBar control. The default version is supported on all desktop and touch platforms, and can be styled with custom CSS. An optional version, selected by setting the NATIVE_SCROLLBAR !OPTIONS setting to TRUE, is implemented using a native browser scrollbar. Because of the way touch platforms implement scrolling, this native version is not available in touch-oriented browsers like Mobile Safari on iOS.
Constants inherited from BBjControl
Example
|
See Also
SCROLL Mnemonic - Set Scrolling Attributes
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.