Android Question Panel 2 over Panel 1 - Buttons of Panel 1 still active


Licensed User
Longtime User
Hello everybody,
I have got the following situation.
I have 2 panels. Panel 1 and Panel2. Panel1 is the main panel,
Panel2 is the panel which should be displayed optional.

When I load the activity, the panel visability is set like this:
Panel1.visible = true
Panel2.visible = false

When I want so show Panel2, I just use:
Panel2.visible = true

Panel2 has controls, e.g. buttons. When I click
the buttons of Panel2 the click event of these buttons is raised correctly.

BUT when I click in Panel2 in the blank field of the Panel (where no controls
are) the event is raised of the control which lays in Panel1 at this location.

Maybe somebody has an idea.
Thank you very much in advance.


Licensed User
Longtime User
I prefer to use the Touch event, as it does not "play" the click sound:
Sub Panel2_Touch (Action As Int, X As Float, Y As Float)
End Sub

(it is better always give a meaningful name to the views).
Last edited:
Upvote 0