DesktopScrollbar

From Xojo Documentation

Class (inherits from DesktopUIControl)


New in 2021r3

The scrollbar control.

Events
Closing FocusLost MouseExit
ConstructContextualMenu FocusReceived MouseMove
ContextualMenuItemSelected KeyDown MouseUp
DragEnter KeyUp MouseWheel
DragExit MouseDown Opening
DragOver MouseDrag ValueChanged
DropObject MouseEnter


Properties
Active fa-lock-32.png LockBottom Scope fa-lock-32.png
AllowAutoDeactivate LockLeft TabIndex
AllowFocus LockRight Tooltip
AllowLiveScrolling LockTop Top
AllowTabStop MaximumValue Transparent
Enabled MinimumValue Value
Handle fa-lock-32.png MouseCursor Visible
Height Name fa-lock-32.png Width
Index fa-lock-32.png PageStep Window fa-lock-32.png
Left PanelIndex
LineStep Parent


Methods
AcceptFileDrop AcceptTextDrop Refresh
AcceptPictureDrop Close SetFocus
AcceptRawDataDrop DrawInto

Notes

A DesktopScrollbar can be either horizontal or vertical. To set its orientation programatically, set the height to be greater than the width for a vertical scrollbar. Set the width to be greater than the height for a horizontal scrollbar.

Examples

Changing the maximum value of a DesktopScrollbar at runtime:

Scrollbar1.MaximumValue = 200

Setting the text of a DesktopLabel, control to the value of the DesktopScrollbar when the user scrolls:

Sub ValueChanged()
Label1.Value = Scrollbar1.Value.ToString
End Sub

See also the discussion of scrolling DesktopListBox controls horizontally using a DesktopScrollbar control.

See Also

DesktopSlider control; DesktopUIControl class.