Interface MouseWheelEnabled::setScrollWheelBehavior

Description

In BBj 6.0 and higher, setScrollWheelBehavior configures under what situations the control will respond to the mouse scroll wheel.

Syntax

Return Value Method

void

setScrollWheelBehavior(int mode)

Parameters

Parameter Description
mode

One of the following MouseWheelEnabled constants:

Constant Description
DEFAULT Use the defaultScrollWheelBehavior of the BBjSysGui.
NEVER This control does not respond.
FOCUS The control responds if focused, unless the moused over control's ScrollWheelBehavior is MOUSE_THEN_FOCUS.
MOUSE_OVER The control responds if moused over and the focused control's ScrollWheeLBehavior is not FOCUS, FOCUS_AND_MOUSE_OVER, or FOCUS_THEN_MOUSE.
FOCUS_AND_MOUSE_OVER The control responds if moused over and focused.
MOUSE_THEN_FOCUS

The control responds if it is moused over and the focused control's ScrollWheelBehavior is not FOCUS, FOCUS_AND_MOUSE_OVER, or FOCUS_THEN_MOUSE.

FOCUS_THEN_MOUSE The control responds if it is focused and the moused over control's ScrollWheelBehavior is not MOUSE_OVER or MOUSE_THEN_FOCUS.

Return Value

None.

Example

SYSGUI=UNT; OPEN(SYSGUI)"X0"
sysgui! = BBjAPI().getSysGui()

win! = sysgui!.addWindow(10,10,160,160,"Scroll Wheel Test",$0000000B$)
win!.setCallback(win!.ON_CLOSE,"APP_CLOSE")

control! = win!.addListBox(101,10,10,60,100,"")
control!.setScrollWheelBehavior(control!.FOCUS)
PRINT "SCROLL MODE: ", control!.getScrollWheelBehavior()

over! = win!.addListBox(102,80,10,60,100,"")
over!.setScrollWheelBehavior(control!.MOUSE_THEN_FOCUS)

for x = 1 to 500
      control!.addItem(str(x)+": ...")
      over!.addItem(str(x)+": ...")
next x

PROCESS_EVENTS

APP_CLOSE:
release
return

See Also

BBjAPI

MouseWheelEnabled::setScrollWheelBehavior

BBjSysGui

BBjSysGui::setDefaultScrollWheelBehavior

BBjControl

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