Scrollbar.AllowFocus

From Xojo Documentation

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

New in 2019r2

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 GotFocus and LostFocus 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 Open event of the scrollbar:

Me.AllowFocus = True