Android Question button event

Discussion in 'Android Questions' started by Andie, Feb 22, 2015.

  1. Andie

    Andie Member Licensed User

    After a break of several months, I resume working with B4A. I'm very ashamed and angry about myself that I'm not able to detect the most simple click event:
    Code:
    Sub Activity_Create(FirstTime As Boolean)

    btnOkay.Initialize(
    "btnOkay_click")
    Activity.AddView(btnOkay,50%x,50%y,30%x,45dip)
    btnOkay.Text = 
    "okay"

    End Sub

    Sub btnOkay_click
        
    Msgbox ("button pressed""success")
    End Sub
    Of course, I did define Dim btnOkay As Button in Sub Globals. What is wrong???
     
  2. TheJinJ

    TheJinJ Active Member Licensed User

    btnOkay.Initialize("btnOkay")

     
  3. Andie

    Andie Member Licensed User

    Thanks a lot!!!
     
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