DesktopWindow.Focus

From Xojo Documentation

Property (As DesktopUIControl )
aDesktopWindow.Focus = newDesktopUIControlValue
or
DesktopUIControlValue = aDesktopWindow.Focus

New in 2021r3

Supported for all project types and targets.

Gets or sets the DesktopUIControl in the window that has the focus. If no control has the focus, this property is Nil.

Example

The following example reports on the control in the DesktopContainer that has the focus.

MessageBox(ContainerControl11.Focus.Name)