View Name

Rusty

Well-Known Member
Licensed User
Longtime User
I would like to be able to pass a view (like a button or edit text) to a subroutine and to be able to determine what the view's "name" is.

B4X:
Dim Button1 as button

SubRoutine(Button1)

Sub SubRoutine(Ctl as view)
     MsgBox("The view's name is:  " & clt.name, "")
End Sub
The above code snippet is hypthetical because the Name property doesn't exist. Is there a way to acquire the view name without putting it into the Tag or other property?
Thanks,
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Yes, that is what I was hoping for.
I'd like to know the name of the view, if that were possible.
So the Sub routine would show "ButtonRose" in your example.
Ideally, I'd like to know which Activity (layout) the button resides and the button's (text) name.
Thanks,
Rusty
 
Upvote 0
Top