Is there any efficient way to get a 'mouse enter' / 'mouse leave' event on a button?
Mouse enter / leave
BlitzMax Forums/BlitzMax GUI Programming/Mouse enter / leave 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.
"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)
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)
Is it possible to change the panel z cordinate without afecting events? Any idea where to find this API? maybe the setwindowspos? any ideas?