Android Question Is there an equiv of btn Command Value in B4A

dannyjon

Member
Licensed User
Longtime User
In .net it's really useful to be able to carry a button command value behind the even handler...is there any way to do that with B4A?

What I am doing is handling a btn click event but I want to read a value, ie 25, rather than the text desc on the btn and handle the value in the btn click event handler.

Thanks
 

nwhitfield

Active Member
Licensed User
Longtime User
This is the code you'd use to check that, if someone's clicked a label, for example

B4X:
Sub myButton_Click
    Dim s As Label
    s = Sender
    Dim value As Int
    value = s.Tag
End sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…