DIB New Member Oct 8, 2021 #1 Hi, i have a really silly question but i'm not able to find a solution. I have been looking in other threads and i know that if i want to make for each label in panel would be somthing like this: B4X: For Each v As View In pnl.GetAllViewsRecursive If v Is Label Then 'do something End If Next pnl is the name of the panel, but when i write the for each i get this error: "Declaracion actual no concuerda con la anterior". Any ideas? sorry about my english level thanks
Hi, i have a really silly question but i'm not able to find a solution. I have been looking in other threads and i know that if i want to make for each label in panel would be somthing like this: B4X: For Each v As View In pnl.GetAllViewsRecursive If v Is Label Then 'do something End If Next pnl is the name of the panel, but when i write the for each i get this error: "Declaracion actual no concuerda con la anterior". Any ideas? sorry about my english level thanks
Erel B4X founder Staff member Licensed User Longtime User Oct 10, 2021 #2 This code will not cause any error, though it is a bit wrong. You probably previously declared v with a different type. Always prefer to use B4XView: Code: For Each v As B4XView in pnl.GetAllViewsRecursive If v Is Label Then v.Text = "abc" End If Next Upvote 0
This code will not cause any error, though it is a bit wrong. You probably previously declared v with a different type. Always prefer to use B4XView: Code: For Each v As B4XView in pnl.GetAllViewsRecursive If v Is Label Then v.Text = "abc" End If Next
DIB New Member Oct 28, 2021 #3 Thanks Erel, v was a file that i use to declare global variables... if i put another letter it works perfectly! Upvote 0
Thanks Erel, v was a file that i use to declare global variables... if i put another letter it works perfectly!