wxRuby Documentation Home

# Wx::ScrollEvent

A scroll event holds information about events sent from stand-alone
scrollbars and sliders. Note that
starting from Widgets 2.1, scrolled windows send the
ScrollWinEvent which does not derive from
CommandEvent, but from Event directly – don’t confuse these two kinds of
events and use the event table macros mentioned below only for the
scrollbar-like controls.

## Derived from

CommandEvent

Event

Object

## Remarks

Note that unless specifying a scroll control identifier, you will need to test for scrollbar
orientation with ScrollEvent#get_orientation, since
horizontal and vertical scroll events are processed using the same event handler.

## See also

ScrollBar, Slider, SpinButton,

ScrollWinEvent, Event handling overview

## Methods

- ScrollEvent.new
- ScrollEvent#get_orientation
- ScrollEvent#get_position

### ScrollEvent.new

ScrollEvent.new(%(arg-type)TYPE% commandType = 0, Integer id = 0, Integer pos = 0, Integer orientation = 0)

Constructor.

### ScrollEvent#get_orientation

Integer get_orientation()

Returns HORIZONTAL or VERTICAL, depending on the orientation of the scrollbar.

### ScrollEvent#get_position

Integer get_position()

Returns the position of the scrollbar.

[This page automatically generated from the Textile source at 2023-06-09 00:45:29 +0000]