vecino Well-Known Member Licensed User Longtime User Oct 22, 2013 #1 Hello, is it possible to loop through all the views of a activity to change, for example, the text color of all buttons? Thanks and regards.
Hello, is it possible to loop through all the views of a activity to change, for example, the text color of all buttons? Thanks and regards.
somed3v3loper Well-Known Member Licensed User Longtime User Oct 22, 2013 #2 This should work B4X: For Each b As Button In Activity.GetAllViewsRecursive b.TextColor=Colors.Red Next Upvote 0
This should work B4X: For Each b As Button In Activity.GetAllViewsRecursive b.TextColor=Colors.Red Next
vecino Well-Known Member Licensed User Longtime User Oct 22, 2013 #3 oooh!... java.lang.ClassCastException: anywheresoftware.b4a.BALayout cannot be cast to android.widget.Button Click to expand... Upvote 0
oooh!... java.lang.ClassCastException: anywheresoftware.b4a.BALayout cannot be cast to android.widget.Button Click to expand...
vecino Well-Known Member Licensed User Longtime User Oct 22, 2013 #4 Hi, I have done so: B4X: For Each v As View In Activity.GetAllViewsRecursive If (v Is Button) Then Dim b As Button = v b.TextColor = Colors.ARGB(255,139,0,0) End If Next Thanks and regards. Upvote 0
Hi, I have done so: B4X: For Each v As View In Activity.GetAllViewsRecursive If (v Is Button) Then Dim b As Button = v b.TextColor = Colors.ARGB(255,139,0,0) End If Next Thanks and regards.