DesktopScrollbar.AllowFocus

From Xojo Documentation

Property (As Boolean )
aDesktopScrollbar.AllowFocus = newBooleanValue
or
BooleanValue = aDesktopScrollbar.AllowFocus

New in 2021r3

Supported for all project types and targets.

If True, the scrollbar will be included in the Tab order and can accept the focus. As a result, the scrollbar's FocusRecieved and FocusLost events will be called when appropriate.

Notes

Some controls automatically accept focus, e.g. text fields or lists, so they do not have AcceptFocus property.

Sample Code

This code enables the AllowFocus property. It is in the Opening event of the scrollbar:

Me.AllowFocus = True