org.eclipse.swt.widgets.ScrollBar

Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Contributors: IBM Corporation - initial API and implementation Port to the D programming language: Frank Benoit <benoit@tionex.de>

Members

Classes

ScrollBar
class ScrollBar

Instances of this class are selectable user interface objects that represent a range of positive, numeric values. <p> At any given moment, a given scroll bar will have a single 'selection' that is considered to be its value, which is constrained to be within the range of values the scroll bar represents (that is, between its <em>minimum</em> and <em>maximum</em> values). </p><p> Typically, scroll bars will be made up of five areas: <ol> <li>an arrow button for decrementing the value</li> <li>a page decrement area for decrementing the value by a larger amount</li> <li>a <em>thumb</em> for modifying the value by mouse dragging</li> <li>a page increment area for incrementing the value by a larger amount</li> <li>an arrow button for incrementing the value</li> </ol> Based on their style, scroll bars are either <code>HORIZONTAL</code> (which have a left facing button for decrementing the value and a right facing button for incrementing it) or <code>VERTICAL</code> (which have an upward facing button for decrementing the value and a downward facing buttons for incrementing it). </p><p> On some platforms, the size of the scroll bar's thumb can be varied relative to the magnitude of the range of values it represents (that is, relative to the difference between its maximum and minimum values). Typically, this is used to indicate some proportional value such as the ratio of the visible area of a document to the total amount of space that it would take to display it. SWT supports setting the thumb size even if the underlying platform does not, but in this case the appearance of the scroll bar will not change. </p><p> Scroll bars are created by specifying either <code>H_SCROLL</code>, <code>V_SCROLL</code> or both when creating a <code>Scrollable</code>. They are accessed from the <code>Scrollable</code> using <code>getHorizontalBar</code> and <code>getVerticalBar</code>. </p><p> Note: Scroll bars are not Controls. On some platforms, scroll bars that appear as part of some standard controls such as a text or list have no operating system resources and are not children of the control. For this reason, scroll bars are treated specially. To create a control that looks like a scroll bar but has operating system resources, use <code>Slider</code>. </p> <dl> <dt><b>Styles:</b></dt> <dd>HORIZONTAL, VERTICAL</dd> <dt><b>Events:</b></dt> <dd>Selection</dd> </dl> <p> Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. </p><p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>

Meta