wxScrollEvent(3)
β¨ wxScrollEvent β¨
okay so this is the manual page for wxScrollEvent from the Erlang wx module (wx 2.6 era, bestie, we're going vintage π
). Buckle up.
πΈ NAME πΈ
wxScrollEvent β a scroll event, and it's literally holding info about events that get sent from stand-alone scrollbars (peep wxScrollBar) and sliders (peep wxSlider). π
π DESCRIPTION π
First things first, queen, because this trips people up: scrolled windows send wxScrollWinEvent, which does not derive from wxCommandEvent β it derives from wxEvent directly. Do not confuse these two kinds of events, okay?? The event table macros mentioned below are only for the scrollbar-like controls. π
π The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED
- The
EVT_SCROLL_THUMBRELEASEevent is only emitted when you're actually dragging the thumb with the mouse and then releasing it. (And thisEVT_SCROLL_THUMBRELEASEevent is also followed by anEVT_SCROLL_CHANGEDevent, so it's giving sequel energy.) - The
EVT_SCROLL_CHANGEDevent also occurs when you use the keyboard to change the thumb position, and when you click next to the thumb. In all these cases, theEVT_SCROLL_THUMBRELEASEevent does not happen. π
In short: the EVT_SCROLL_CHANGED event is triggered when scrolling/moving has finished, no matter how it started. Independent main character energy, fr fr. Please see the page_samples_widgets ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action. π
Remark: note that unless you specify 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. iykyk π«Ά
See:
wxScrollBarwxSliderwxSpinButtonwxScrollWinEvent- Overview events
This class is derived, and can use functions, from:
wxCommandEventwxEvent
wxWidgets docs: wxScrollEvent
π¦ Events π¦
Use wxEvtHandler:connect/3 with wxScrollEventType to subscribe to events of this type. No gatekeeping here. β¨
β DATA TYPES β
wxScroll() :: #wxScroll{}.
wxScrollEvent() :: wx:wx_object().
wxScrollEventType() ::
scroll_top | scroll_bottom | scroll_lineup | scroll_linedown |
scroll_pageup | scroll_pagedown | scroll_thumbtrack |
scroll_thumbrelease | scroll_changed.
π FUNCTIONS π
getOrientation(This) -> integer() when This :: wxScrollEvent().β ReturnswxHORIZONTALorwxVERTICAL, depending on the orientation of the scrollbar. It's giving directional clarity, periodt. π§getPosition(This) -> integer() when This :: wxScrollEvent().β Returns the position of the scrollbar. Where's the thumb at? This tells you. π
and that's the whole page, bestie!! π this was the wxScrollEvent manual for the Erlang wx module, brought to you by Ericsson AB with wx 2.6, dated wxScrollEvent(3). slay, go touch some scrollbars. πΈβ¨π
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms