Android Question name property

luke2012

Well-Known Member
Licensed User
Longtime User
Hi to all,
it's possible to access the name property of a view by code (without using the tag property) ?

For example:

B4X:
'*** Caller event within the object
Private Sub panel1_Click  
    'raise the specify event in the caller module
    If SubExists(mModule, mEventName & "_Click") Then
        CallSubDelayed2(mModule, mEventName & "_Click", panel1)
    End If
End Sub

'*** App Main module
Sub MyEventName_Click (pnl As Panel)
       if pnl.name = "panel1" then ...
end sub

The point is : how known the name of the panel where the event was generated ?
 
Last edited:

RandomCoder

Well-Known Member
Licensed User
Longtime User
I'm afraid not, this property isn't exposed.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
This property cant be exposed. There is no such property

You can create a map and put all panel into this map giving the object a keyname which you then can use to get the panel from the map.
 
Upvote 0
Top