wxScrollEvent(3erl)
π¦ wxScrollEvent(3erl) π¦
Erlang Module Definition β okay bestie, this is the manual page for wxScrollEvent, and weβre gonna make it make sense. π
πΈ NAME πΈ
wxScrollEvent β Functions for wxScrollEvent class. Periodt, thatβs the whole name vibe. β¨
π DESCRIPTION π
Okay so, a scroll event holds information about events sent from stand-alone scrollbars (see wxScrollBar) and sliders (see wxSlider). Thatβs the main character energy here. π
Note that scrolled windows send the wxScrollWinEvent which does not derive from wxCommandEvent, but from wxEvent directly - don't confuse these two kinds of events and use the event table macros mentioned below only for the scrollbar-like controls. No cap, this distinction matters. π
π The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED π
This is the part where people get confused, ngl. The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an EVT_SCROLL_CHANGED event).
The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen). Bestie, thatβs the lowkey key difference. π«Ά
In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/moving has finished independently of the way it had started. Please see the page_samples_widgets ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action. Iconic behavior, fr fr. π
Remark: Note that unless specifying a scroll control identifier, you will need to test for scrollbar orientation with getOrientation/1, since horizontal and vertical scroll events are processed using the same event handler. π¨
See: wxScrollBar, wxSlider, wxSpinButton, wxScrollWinEvent, Overview events
This class is derived (and can use functions) from: wxCommandEvent wxEvent β slay. π
wxWidgets docs: wxScrollEvent β iykyk. β¨
β¨ EVENTS β¨
Use wxEvtHandler:connect/3 with wxScrollEventType to subscribe to events of this type. Thatβs the whole vibe check. π
π§ DATA TYPES π§
Lowkey these are the exact shapes youβll see, no cap:
wxScrollEvent()
wxScrollEvent() = wx:wx_object()
wxScroll()
wxScroll() =
#wxScroll{type = wxScrollEvent:wxScrollEventType(),
commandInt = integer(),
extraLong = integer()}
wxScrollEventType()
wxScrollEventType() =
scroll_top | scroll_bottom | scroll_lineup | scroll_linedown |
scroll_pageup | scroll_pagedown | scroll_thumbtrack |
scroll_thumbrelease | scroll_changed
π EXPORTS π
These are the functions you can call, and yes, theyβre iconic:
getOrientation(This) -> integer()
Types:
This=wxScrollEvent()
Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar. Highkey useful. π¦
getPosition(This) -> integer()
Types:
This=wxScrollEvent()
Returns the position of the scrollbar. Periodt. πΈ
Thatβs the whole page, bestie! The footer credits the wxWidgets team, says wx 2.2.2.1, and tags this page as wxScrollEvent(3erl) β thereβs no date on the page itself. π
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms