From Xojo Documentation

Revision as of 20:21, 23 July 2021 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from DesktopUIControl)

New in 2021r3

The scrollbar control.

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

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

AcceptFileDrop AcceptTextDrop Refresh
AcceptPictureDrop Close SetFocus
AcceptRawDataDrop DrawInto


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.


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.