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
 

Nkalampika

Active Member
Licensed User

how to get a text from a label trigger by a button that has the sender ??
look at the image I uploaded
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
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

  • Button Example.zip
    9.4 KB · Views: 150
Upvote 0

mangojack

Expert
Licensed User
Longtime User
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 ...
B4X:
Sub Button_Click
    Dim b As Button = Sender   
    Dim p As B4XView  = b.Parent   
    LabelSenderInfo.Text = p.GetView(0).Text
End Sub
 

Attachments

  • Button Example 2.zip
    9.5 KB · Views: 151
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…