Label3.Visible = False
Dim VisibleCounter As Int = 0
Dim GapBetween As Float = 10dip 'The gap between the labels
For i = 0 To Root.NumberOfViews -1 'Put your buttons inside a panel, so you can loop through
Dim xlbl As B4XView = Root.GetView(i)
If xlbl.Visible = True Then 'If the label visible
xlbl.Left = ((xlbl.Width + GapBetween)*VisibleCounter) + GapBetween 'Set the left position of the label + an extra gap, so that the button on the left does not stick to the corner
VisibleCounter = VisibleCounter +1 'Count +1
End If
Next