Field Summary |
public static
| classInfo: Object |
| A static class information object
|
|
public
| horizontal: Boolean |
| A Boolean value indicating whether the scroll bar is scrolling the target vertically (false), the default, or horizontally (true).
|
|
public
| liveDragging: Boolean |
|
|
|
public
| styleClass: String |
| The name of the style class this instance will use.
|
|
| Fields inherited from class xp.system.UIControl__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment |
|
Property Summary |
public
| backgroundVisible: Boolean (read, write) |
| redeclare to change default
|
|
public
| largeScroll: Number (read, write) |
| The number of lines or pixels scrolled when the user clicks the track of the scroll bar.
|
|
public
| mode: String (read, write) |
| Controls the mode either scroller or slider
|
|
public
| orientation: String (read, write) |
| A value indicating whether the scroll bar is oriented vertically (vertical), the default, or horizontally (horizontal).
|
|
public
| scrollPosition (read, write) |
| The current scroll position of the scroll bar.
|
|
public
| smallScroll: Number (read, write) |
| The number of lines or pixels scrolled when the user clicks the arrow buttons of the scroll bar.
|
|
public
| virtualWidth: Number (read-only)
|
| calculates the effective space required for the scrollbar
|
|
| Properties inherited from class xp.system.UIControlalpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y |
|
Constructor |
public
| ScrollBar (
)
|
| Constructor - This should not be called directly.
|
|
Method Summary |
public
| getClass (
): Function |
| Returns a reference to the components static class
|
|
public
| onChanged (
t
) |
| called by scrolltarget
|
|
public
| onScroller (
t
) |
| called by the scrolltarget
|
|
public
| resizeBar (
v: Number
) |
| resize the scrollbar "height" makes allowance for the orientation of the bar
|
|
public
| setScrollTarget (
t
): Void |
| Assigns the ScrollBar to a scrollable control
|
|
| Methods inherited from class xp.system.UIControladdBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate |
|
|
The IScrollTarget interface is the notional interface implemented by the TextField builtIn object to provide scroll support
The standard TextFields implements this Interface but the ScrollBar can work with any custom control as long as it implemement this interface.
In order to simplify the process of adding scroll support to your own controls we provide the ScrolTarget proxy class.
The ScrollTarget class implements the IScrollTarget interface for you and helps to relay events between the two.
To change the scrollbar from a vertical orientated scrollbar to a horizontal scrollbar change the orientation property and then resize the scrollbar to the required dimension.
You do NOT need to rotate the scrollbar.
The horizontal property determines whether the ScrollBar uses the scroll or hscroll properties on the IScrollTarget interface.
It is NOT connected to the physical orientation of the scrollbar, although commonly both indicate the same mode.
It is NOT a requirement that physically horizontally orienatetd scrollbars must use the hscroll property.
At author time you should also alter the dimension of the scrollbar as required.
The properties of the ScrollBar class let you adjust the scroll position and the amount of scrolling that occurs when the user clicks the scroll arrows or the scroll track.
The ScrollBar unlike most other controls does not emit events instead it calls hscroll and scroll methods on the ScrollTarget
If backgroundVisible is set to true, then when the scrollbar is not required(disabled), then a themed gradinet background will be displayed.
If backgroundVisible is false it reverts to the standard mode where it display the button and track but hides the thumb when not required(disabled)
Events:
enabled xp.events.StateEvent