# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # A {Wx::ScrollBar} is a control that represents a horizontal or vertical scrollbar. # It is distinct from the two scrollbars that some windows provide automatically, but the two types of scrollbar share the way events are received. # A scrollbar has the following main attributes: range, thumb size, page size, and position. The range is the total number of units associated with the view represented by the scrollbar. For a table with 15 columns, the range would be 15. The thumb size is the number of units that are currently visible. For the table example, the window might be sized so that only 5 columns are currently visible, in which case the application would set the thumb size to 5. When the thumb size becomes the same as or greater than the range, the scrollbar will be automatically hidden on most platforms. The page size is the number of units that the scrollbar should scroll by, when 'paging' through the data. This value is normally the same as the thumb size length, because it is natural to assume that the visible window size defines a page. The scrollbar position is the current thumb position. Most applications will find it convenient to provide a function called AdjustScrollbars() which can be called initially, from an OnSize event handler, and whenever the application data changes in size. It will adjust the view, object and page size according to the size of the window and the size of the data. # # === Styles # # This class supports the following styles: # # - {Wx::SB_HORIZONTAL}: Specifies a horizontal scrollbar. # # - {Wx::SB_VERTICAL}: Specifies a vertical scrollbar. # # === Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::ScrollEvent} events. # Event handler methods for events emitted by this class: except for this, the macros behave exactly the same. # # - {Wx::EvtHandler#evt_scroll}(meth = nil, &block): Process all scroll events. # # - {Wx::EvtHandler#evt_scroll_top}(meth = nil, &block): Process {Wx::EVT_SCROLL_TOP} scroll to top or leftmost (minimum) position events. # # - {Wx::EvtHandler#evt_scroll_bottom}(meth = nil, &block): Process {Wx::EVT_SCROLL_BOTTOM} scroll to bottom or rightmost (maximum) position events. # # - {Wx::EvtHandler#evt_scroll_lineup}(meth = nil, &block): Process {Wx::EVT_SCROLL_LINEUP} line up or left events. # # - {Wx::EvtHandler#evt_scroll_linedown}(meth = nil, &block): Process {Wx::EVT_SCROLL_LINEDOWN} line down or right events. # # - {Wx::EvtHandler#evt_scroll_pageup}(meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEUP} page up or left events. # # - {Wx::EvtHandler#evt_scroll_pagedown}(meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEDOWN} page down or right events. # # - {Wx::EvtHandler#evt_scroll_thumbtrack}(meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBTRACK} thumbtrack events (frequent events sent as the user drags the thumbtrack). # # - {Wx::EvtHandler#evt_scroll_thumbrelease}(meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBRELEASE} thumb release events. # # - {Wx::EvtHandler#evt_scroll_changed}(meth = nil, &block): Process {Wx::EVT_SCROLL_CHANGED} end of scrolling events (MSW only). # # - {Wx::EvtHandler#evt_command_scroll}(id, meth = nil, &block): Process all scroll events. # # - {Wx::EvtHandler#evt_command_scroll_top}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_TOP} scroll to top or leftmost (minimum) position events. # # - {Wx::EvtHandler#evt_command_scroll_bottom}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_BOTTOM} scroll to bottom or rightmost (maximum) position events. # # - {Wx::EvtHandler#evt_command_scroll_lineup}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_LINEUP} line up or left events. # # - {Wx::EvtHandler#evt_command_scroll_linedown}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_LINEDOWN} line down or right events. # # - {Wx::EvtHandler#evt_command_scroll_pageup}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEUP} page up or left events. # # - {Wx::EvtHandler#evt_command_scroll_pagedown}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_PAGEDOWN} page down or right events. # # - {Wx::EvtHandler#evt_command_scroll_thumbtrack}(id, meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBTRACK} thumbtrack events (frequent events sent as the user drags the thumbtrack). # # - {Wx::EvtHandler#evt_command_scroll_thumbrelease}(meth = nil, &block): Process {Wx::EVT_SCROLL_THUMBRELEASE} thumb release events. # # - {Wx::EvtHandler#evt_command_scroll_changed}(meth = nil, &block): Process {Wx::EVT_SCROLL_CHANGED} end of scrolling events (MSW only). # # == The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED # # 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). # In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/moving has finished independently of the way it had started. Please see the Widgets Sample ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action. # === # # Category: {Wx::Controls}
wxMSW Appearance # | wxGTK Appearance # | wxOSX Appearance # |