ScrollMessageWidget.addDefaultWheelListeners

Add default event listeners for keyboard and mouse wheel scrolling shortcuts.

More...
class ScrollMessageWidget
void
addDefaultWheelListeners

Parameters

verticalWheelScrollAmount int

how much should be scrolled vertically on each tick of the mouse wheel

horizontalWheelScrollAmount int

how much should be scrolled horizontally when alt is held on each tick of the mouse wheel

shiftMultiplier int

multiplies the scroll amount by this when shift is held

Detailed Description

The defaults for addDefaultWheelListeners are:

  • Mouse wheel scrolls vertically
  • Alt key + mouse wheel scrolls horiontally
  • Shift + mouse wheel scrolls faster.
  • Any mouse click or wheel event will focus the inner widget if it has tabStop = true

The defaults for addDefaultKeyboardListeners are:

  • Arrow keys scroll by the given amounts
  • Shift+arrow keys scroll by the given amounts times the given shiftMultiplier
  • Page up and down scroll by the vertical viewable area
  • Home and end scroll to the start and end of the verticle viewable area.
  • Alt + page up / page down / home / end will horizonally scroll instead of vertical.

My recommendation is to change the scroll amounts if you are scrolling by pixels, but otherwise keep them at one line.

Meta