I would like to know if there is a programmatically way to check if the mouse is over a component.
I would expect a button object already has something build in that I should be able to fetch?
The reason I need this is that I draw some custom components using a paintable canvas.
As an example, I use: event.source.parent.getComponent('btnOverlay').isFocusOwner() to check if my button is the focus owner, depending on that I draw a focus rectangle.
The way I do it now is by setting a custom property with the mouseEntered event and resetting the custom property with the mouseExited event.
The problem here is that if my button closes the window and I reopen it, it remains highlighted since the cutom property is not updating.
So a direct programmatically way should solve this.
Yeah I'm aware of these component events. But they don't fully cover my issue. Since the mouseExit event does't occur whenever the page is closed on click.
Hi amarks, I'm also aware of that, but I'd rather figure it out on my custom component level than on the page event properties to keep everything within the object.