.\" This is a wxWidgets manpage page generated from the XML docs .TH wxScrollBar 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxScrollBar \- Scrollbar control .SH DESCRIPTION A wxScrollBar 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. .SH REMARKS 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. .SH "PARENTS" wxControl wxWindow wxEvtHandler wxObject .SH "INCLUDE FILES" wx/scrolbar.h .SH MEMBERS .SS wxScrollBar () Default constructor. .SS wxScrollBar (wxWindow* parentwxWindowID idconst wxPoint& pos = wxDefaultPositionconst wxSize& size = wxDefaultSizelong style = wxSB_HORIZONTALconst wxValidator& validator = wxDefaultValidatorconst wxString& name = ``scrollBar") .SS void ~wxScrollBar () Destructor, destroying the scrollbar. .SS bool Create (wxWindow* parentwxWindowID idconst wxPoint& pos = wxDefaultPositionconst wxSize& size = wxDefaultSizelong style = wxSB_HORIZONTALconst wxValidator& validator = wxDefaultValidatorconst wxString& name = ``scrollBar") Scrollbar creation function called by the scrollbar constructor. See wxScrollBar::wxScrollBar for details. .SS int GetRange () Returns the length of the scrollbar. .SS int GetPageSize () Returns the page size of the scrollbar. This is the number of scroll units that will be scrolled when the user pages up or down. Often it is the same as the thumb size. .SS int GetThumbPosition () Returns the current position of the scrollbar thumb. .SS int GetThumbSize () Returns the thumb or `view' size. .SS void SetObjectLength (int objectLength) Sets the object length for the scrollbar. This is the total object size (virtual size). You must call SetViewLength before calling SetObjectLength. .SS void SetPageSize (int pageSize) Sets the page size for the scrollbar. This is the number of scroll units which are scrolled when the user pages down (clicks on the scrollbar outside the thumbtrack area). .SS void SetThumbPosition (int viewStart) Sets the position of the scrollbar. .SS virtual void SetScrollbar (int positionint thumbSizeint rangeint pageSizeconst bool refresh = true) .SS void SetViewLength (int viewLength) Sets the view length for the scrollbar. .SH "WINDOW STYLES" .SS wxSB_HORIZONTAL Specifies a horizontal scrollbar. .SS wxSB_VERTICAL Specifies a vertical scrollbar. .SH "SEE ALSO" wxControl wxWindow wxEvtHandler wxObject Scrolling overview , Event handling overview , wxScrolledWindow .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.