Android Question B4XFloatTextField Problem

imbault

Well-Known Member
Licensed User
Longtime User
Hi, I recursively go throught a panel, and I've troube dealing with B4XFloatTextField : here is the code

Code: Copy
    Dim pn = findPanel(clv2, "epi2") As Panel
    For Each v As View In pn.GetAllViewsRecursive
        If v Is B4XFloatTextField Then
                Dim vx As B4XFloatTextField = v      '''Types do not match as the compiler complains
                Dim m As Map
                m.Initialize
                m.Put(vx.tag,vx.text)
                ListOfMaps.Add(m)
        End If
    Next
 
Last edited:
Custom views instances are not views.
Luckily all of XUI Views store a reference to the class instance in the tag property of the base view.
Code: Copy
For Each v As B4XView In pn.GetAllViewsRecursive
 If v.Tag Is B4XFloatTextField Then
  Dim f As B4XFloatTextField = v.Tag
  ...
End If
Next
 
Upvote 0
Back
Top