A Andie Member Licensed User Longtime User Feb 22, 2015 #1 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???
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???
TheJinJ Active Member Licensed User Longtime User Feb 22, 2015 #2 btnOkay.Initialize("btnOkay") Andie said: 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??? Click to expand... Upvote 0
btnOkay.Initialize("btnOkay") Andie said: 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??? Click to expand...