BBjSlider

Description

The BBjSlider object provides methods for manipulating a GUI slider control.

Implemented Interfaces

DropTarget, Focusable, MouseWheelEnabled, RecordSetBindable, SimpleRecordSetBindable,TabTraversable

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjSlider

A BBjSlider object is created through the following BBjWindow methods:

Return Value

Method

BBjSlider

addHorizontalSlider()

BBjSlider

addHorizontalSlider(int ID)

BBjSlider

addHorizontalSlider(int ID, number x, number y, number width, number height)

BBjSlider

addHorizontalSlider(int ID, number x, number y, number width, number height, string flags)

BBjSlider

addHorizontalSlider(int ID, string flags)

BBjSlider addHorizontalSlider(String flags)
BBjSlider addVerticalSlider()
BBjSlider addVerticalSlider(int ID)
BBjSlider addVerticalSlider(int ID, number x, number y, number w, number h)
BBjSlider addVerticalSlider(int ID, number x, number y, number w, number h, string flags)
BBjSlider addVerticalSlider(int ID, string flags)

BBjSlider

addVerticalSlider(string flags)

Methods of BBjSlider

Return Value

Method

boolean

getInverted()

Map<Integer,String>

getLabels()

int

getMajorTickSpacing()

int

getMaximum()

int

getMinimum()

int

getMinorTickSpacing()

int

getOrientation()

boolean

getPaintLabels()

boolean

getPaintTicks()

boolean

getSnapToTicks()

int

getValue()

void

setInverted(boolean inverted)

void

setLabels(Map<Integer,String> labels)

void

setMajorTickSpacing(int tick)

void

setMaximum(int maximum)

void

setMinimum(int minimum)

void

setMinorTickSpacing(int tick)

void

setPaintLabels(boolean paint)

void

setPaintTicks(boolean paint)

void

setSnapToTicks(boolean snap)

void

setValue(intvalue)

Methods of BBjSlider implemented for DropTarget

Return Value

Method

int

getDropActions()

void

setDropActions(int actions)

BBjVector

getDropTypes()

void

setDropTypes(BBjVector types)

Methods of BBjSlider implemented for Focusable

Return Value

Method

boolean

isFocusable()

void

setFocusable(boolean p_focus)

Methods of BBjSlider implemented for MouseWheelEnabled

Return Value

Method

int

getScrollWheelBehavior()

void

setScrollWheelBehavior(int trav)

Methods of BBjSlider implemented for RecordSetBindable

Return Value

Method

void

bindRecordSet(BBjRecordSet recordset, string fieldname)

string

getBoundFieldName()

Methods of BBjSlider implemented for SimpleRecordSetBindable

Return Value

Method

BBjRecordSet

getBoundRecordSet()

void

unbindRecordSet()

Methods of BBjSlider implemented for TabTraversable

Return Value

Method

boolean

isTabTraversable()

void

setTabTraversable(boolean trav)

Methods of BBjSlider inherited from BBjControl

Events

Callback Code

Object-oriented Event

Read Record Event

Code

ON_CONTROL_SCROLL

BBjControlScrollEvent

Scrollbar Move Event

p

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


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.

For a sample BBjSlider, refer to the BUI Showcase (demo, code). The BBjSlider defines the following style names:

.BBjSlider

.BBjSlider.bbj-disabled

.BBjSlider.bbj-focused

.BBjSlider.bbj-horizontal

.BBjSlider.bbj-vertical

.BBjSlider.bbj-labels

.BBjSlider.bbj-ticks

.BBjSlider-line

.BBjSlider-line-sliding

.BBjSlider-knob

.BBjSlider-knob-sliding

.BBjSlider-label

.BBjSlider-minor-tick

.BBjSlider-major-tick

Remarks

None.

Constants inherited from BBjControl

Example

rem 'Add a vertical Slider 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 vertical Slider on the window
myVSlider! = myWindow!.addVerticalSlider(101,180,0,20,200,$0000$)

rem 'Register the CALLBACK routines
CALLBACK(ON_CONTROL_SCROLL,SLIDER_SCROLLED,mySysGui!.getContext(),myVSlider!.getID())
CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

rem 'Process Events
process_events

rem 'Callback routine called when the Slider is used to scroll
SLIDER_SCROLLED:
    rem 'Display a message that the Slider has been used to scroll
    MESSAGE$="The Slider has been used to scroll"
    let X = MSGBOX(MESSAGE$)
return

rem 'Callback routine called when the user closes the application window
APP_CLOSE:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

SCROLL Mnemonic - Set Scrolling Attributes

CALLBACK Verb - Register BBj Subroutine

Focusable

MouseWheelEnabled

TabTraversable

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