B4J Question Buttons in listview, how to handle

rboeck

Well-Known Member
Licensed User
Longtime User
I made an small layout with caption and buttons in an listview control. Now i want to know, which button was pressed. When i add the buttons, i set the text property to the current value.(1 - 5)
The first problem is, that the event Listview1_SelectedIndexChanged does not get fired, when i click on the button.
The Button.Text Value on the screen is 1 to 5, but if i click one of the buttons, i get only 5; whats excactly is wrong in my concept?
 

Attachments

  • Test.zip
    1.5 KB · Views: 224

Roycefer

Well-Known Member
Licensed User
Longtime User
Try this instead of your current btnB_Action sub:
B4X:
Sub btnB_Action
    Dim b As Button = Sender
    Log(b.Text)
End Sub
 
Upvote 0
Top