Mouse enter / leave

BlitzMax Forums/MaxGUI Module/Mouse enter / leave

ziggy(Posted 2006) [#1]
Is there any efficient way to get a 'mouse enter' / 'mouse leave' event on a button?


tonyg(Posted 2006) [#2]
Didn't you ask this before?
and there's this


ziggy(Posted 2006) [#3]
Yes, but none of them are good solutions. The one with the larger panel doesn't work if the user doesn't pass the mouse over the panel and gets directly to the button, and the other one is not much usable when there are lots of panels in a window, or the buttons are sticked with 0 pixels of separation... I was wondering if someone had made a better solution.


Dreamora(Posted 2006) [#4]
"best way" and the way it is normally done, at least on Windows from what I know:

1 panel per button, using the WinAPI function to change gadget z coordinate and move the panel behind mouse (visually only).

Then, whenever the button is entered, the panel is as well.

Alternative: only use panels, no buttons at all. This would work better and allow you "full control" over the visual style of the button, what you don't have otherwise (unless you use bare windows standard. because manifests aren't said to work)

There is not much more you can do as this is the way its fixed into MaxGUI. You would need to exchange the underlying code to react to other stuff than that. (surely, it would be far easier if it was "fixed" that far that all gadgets fire all events instead of only part gadgets part of events as it currently is)


ziggy(Posted 2006) [#5]
Is it possible to change the panel z cordinate without afecting events? Any idea where to find this API? maybe the setwindowspos? any ideas?