MobileScreen.Controls

From Xojo Documentation

Method

MobileScreen.Controls() As Iterable

New in 2020r2

Supported for all project types and targets.

Used to iterate through the controls on a Screen.

Notes

All controls on the Screen are returned as a the MobileControl base type. You can use the IsA operator to check the specific type to see if the control is a MobileButton, MobileLabel, etc.

Sample Code

Loop through all the controls on a Screen and disable only the TextFields:

For Each c As MobileUIControl In Self.Controls
If c IsA MobileTextField Then
MobileTextField(c).Enabled = False
End If
Next