Android Question help sender

Nkalampika

Active Member
Licensed User
hello how to recover an element is a text based sender! by example, I have a button! when I click on it I get a text based on its position because I have a panel that has buttons and I would like a button to send me a text relative to its position
 
rep.jpg
how to get a text from a label trigger by a button that has the sender ??
look at the image I uploaded
 
Upvote 0
Unsure if this is what your asking .. check the example.

PS : I based the example on your first post question .. unsure if the example answers you second post query ?
 

Attachments

Upvote 0
how to get a text from a label trigger by a button that has the sender ??

This probably answers you 2nd post better ...

EDIT: If this solves you problem , you might want to load the XUI library and change the Button code to ...
Code: Copy
Sub Button_Click
    Dim b As Button = Sender   
    Dim p As B4XView  = b.Parent   
    LabelSenderInfo.Text = p.GetView(0).Text
End Sub
 

Attachments

Last edited:
Upvote 0
Back
Top