Android Question Difference between B4A and B4I panel

mare1980k1

Member
Licensed User
Longtime User
Hello guys...
When i put panel over button in B4I, and when both of them are visible, i can't click on the button because the panel is on top of it...
but in B4A it works differently.... i can click on button when panel is on top of it... Is that a bug? How can i make it work like it does in B4I?
 

klaus

Expert
Licensed User
Longtime User
It is not a bug!
B4A and B4i are different operating systems and don't work the same way.
In B4A, when you put a Panel, without a Click routine, above a Button the events are transmitted to the underlying Button, this is not the case in B4i.

In B4A, to get the default behaviour of B4i, add an empty event routine, this will consume the events:
B4X:
Private Sub Panel1_Click

End Sub

In B4i, to get the default behaviour of B4A, add this line, this will transmit the events to the underlying views:
B4X:
Panel1.UserInteractionEnabled = False
 
Upvote 0
Top