B4J Question Buttons in listview, how to handle

Discussion in 'B4J Questions' started by rboeck, Jul 24, 2015.

  1. rboeck

    rboeck Well-Known Member Licensed 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?
     

    Attached Files:

  2. Roycefer

    Roycefer Well-Known Member Licensed User

    Try this instead of your current btnB_Action sub:
    Code:
    Sub btnB_Action
        
    Dim b As Button = Sender
        
    Log(b.Text)
    End Sub
     
    Erel likes this.
  3. rboeck

    rboeck Well-Known Member Licensed User

    Thank you, that works!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice