Sub Button1_Click
For Each vw As View In Activity
' check its type
If vw Is Label Then
' labl = vw
Dim labl As Label
labl = vw
labl.Visible = False
' need object with correct type so
' can gain access to properties
' make copy of original view
' labl.Visible = False
' labl = vw
' Log (btn.Text)
End If
Next
End Sub
How to clear 4 Labels on , TabStrip1.LoadLayout("Page1", "PAGE 1")
Sub TabStrip1_PageSelected (Position As Int)
Log($"Current page: ${Position}"$)
If Position = 0 Then
For Each v As View In Activity.GetAllViewsRecursive
'Log(GetType(v))
If v Is Label Then
Dim labl As Label
labl = v
' Do with labl what you want. Set it visible, change the text....
'labl.Visible = False
labl.Text = "TEXT"
End If
Next
End If
End Sub
3. Additionally you can use the Tag of the labels to distinguish them. Or to identify them to know which one to change...
I like GetAllViewsRecursive but it really does get all of the selected type and hide every label on every Tab, is there something similar for the selected Views on Page1 only?
As in:
For Each v As View In Page1.GetAllViewsRecursive
thanks for the example, I have put the 4 Labels of Page1 on a Panel, renamed the Button because of a duplicate name on another Tab, and am using:
Sub Button_Click
Panel2.Visible = False
End Sub