B4J Question Triggering Mouse_Entered and Mouse_Exited events on superimposed panes/images

Cableguy

Expert
Licensed User
Hi guys

I have a layout composed of several (5) superimposed panes.
Using the BackgroundImage property I set each with an image that has transparent background, and by doing so I get my desired final layout.
I am trying to get Mouse-Entered and Mouse_Exited events to fire on those superimposed panes, but I can only make it work on the foremost pane.

Any help or advise is welcome
 

Cableguy

Expert
Licensed User
was about to try that, I'll let you know if it worked

[EDIT]

If PickOnBounds is set to False, the event ( I set using JavaObject) does never get triggered;
If PickOnBounds is set to True, all of the view is used, even the transparent portion, to trigger the events
 
Last edited:

Cableguy

Expert
Licensed User
So, here is my stripped down, uggly coded, test project.

There are 5 panes, all with a transparent part. My objective is to detect the mouse hover (entered & exited) events on each panel, excluding the transparent portions.

easier said than done it seems….
 

Attachments

Daestrum

Well-Known Member
Licensed User
I can sort of get it working, but where the chevrons have I guess transparent pixels in the image, I detect the top image then the bottom one as the mouse moves across the chevron images. (hope that makes sense)
 

Cableguy

Expert
Licensed User
Thanks @Daestrum ...

I had a crazy thought ( and also recalled having had this issue before) and changed from Pane to ImageView, and guess what?!

IT WORKS AS INTENDED!
 
Top