B4J Question node type

hanyelmehy

Active Member
Licensed User
Longtime User
when use
B4X:
For Each n As Node In panel.GetAllViewsRecursive
B4X:
If n Is Spinner Then
            
else If n Is TextField Then

End If
spinner are recognized as Spinner and as TextField ?
 

Cableguy

Expert
Licensed User
Longtime User
You need to understand that complex nodes like the spinner are not base nodes, they are more like a superimposition of several nodes.
So any text based node will also be recognised as a textfield node, if it contains buttons as the spinner does, it will also be recognised as button, and so on, according to hierarchical position...
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Not sure how you are creating the Spinner but I tested this and it is only recognised as a Spinner, not as a Textfield.

The code you posted for the if statement, it is impossible for it to be both. If it's a Spinner it won't even check if it's a Textfield.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…