G Geraldo Silva Member Licensed User Apr 5, 2019 #1 Hello . I need a help how can I loop in all form's Labels (B4j)? ???? For i = 0 to MyForm.GetView ???? log(label.text) Next
Hello . I need a help how can I loop in all form's Labels (B4j)? ???? For i = 0 to MyForm.GetView ???? log(label.text) Next
DonManfred Expert Licensed User Longtime User Apr 5, 2019 #2 B4X: For Each n As Node In MainForm.RootPane.GetAllViewsRecursive Log(n) If n Is Label Then Dim lbl As Label = n Log("Label Text = "&lbl.Text) End If Next Upvote 0
B4X: For Each n As Node In MainForm.RootPane.GetAllViewsRecursive Log(n) If n Is Label Then Dim lbl As Label = n Log("Label Text = "&lbl.Text) End If Next
Erel B4X founder Staff member Licensed User Longtime User Apr 5, 2019 #3 Another option: B4X: For Each n As B4XView In MainForm.RootPane.GetAllViewsRecursive 'add a reference to XUI library If n Is Label Then Log("Label Text = "& n.Text) End If Next Upvote 0
Another option: B4X: For Each n As B4XView In MainForm.RootPane.GetAllViewsRecursive 'add a reference to XUI library If n Is Label Then Log("Label Text = "& n.Text) End If Next