Android Question Button Click does not work

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,
I create a button with the designer, use tools / generate emenbers to create the click method and set its properties in Basic. This always works, but with one button it does not work. Why? How can I test or find the error?

B4X:
Sub Bmainmenu_Click
   mainmenu.Show(Sender) ' this line is never reached
End Sub
 

stevel05

Expert
Licensed User
Longtime User
Without seeing the code it's guessing, but have you changed the EventName in the designer?
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
I think I've seen a similar post .. The remedy was delete button and associated event code.
Regenerating a new button and event code solved the problem. Maybe save and restart your project after the first change ?
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Check if the event name for that button in the Designer: it should be "Bmainmenu"

upload_2014-4-19_15-30-25.png
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Here it is, thank you for your trouble. The activity "Touch" (touch.bal) has 4 buttons. The 2 with text "Manu" do not work. The click subs are at the end of the code of "Touch".
 

Attachments

  • proj.zip
    94.7 KB · Views: 157
Upvote 0

klaus

Expert
Licensed User
Longtime User
The problem is your Panel pnl which is covering the buttons !
In Debug mode, set a breakpoint in the pnl_Touch routine you'll see that this routine is run when you click on the buttons !
And pnl_Touch consumes the event and it is not transmitted to the buttons !
 
Upvote 0
Top