I put a few buttons on Activity, blanket them allover with a panel then put
new buttons on the panel, making their parent Panel1. but to my surprise,
when I clicked on an area on the panel, where a button is hiding behind in the
activity, that button's code is executed.
I thought Panels are containers and can not act on views' events
that don't belong to them.
You need to consume the panel click event otherwise it will go through to underlying views.
You can do this by simple creating a Panel_Touch sub. I am not sure whether or not you need to return True/False, but surely you can experiment with that.
You need to consume the panel click event otherwise it will go through to underlying views.
You can do this by simple creating a Panel_Touch sub. I am not sure whether or not you need to return True/False, but surely you can experiment with that.
On my device your code works as expected !
If you click on the button in an area where the button is covered by the panel nothing happens.
If you click on a visible area of the button, the Button1_Click event is, of cours, fired.