Re: wxEuphoria - On hover
- Posted by Steady Jan 14, 2015
- 2096 views
Is there something like a list opening up when a mouse hovers, in a list or in a grid cell.
I am aware that I can click to do an action, but instead of clicking I want to open out another list or do any action as soon as the mouse hovers in the appropriate area.
You'll need to use the wxEVT_MOTION event to track mouse movements (you'll get a lot of them). Then you can use mouse_event_position() to get the position of the mouse for that event. However, I don't think there are any functions that determine the specific bounds of a cell on screen. Ultimately, I would recommend using a wxGrid with the wxGridCellChoiceEditor column type. See set_col_editor() for details.
You might try MouseTraps ... Defined sub-regions of a window that can generate w32HMouseTrap events.
That's only for Win32Lib, not wxEuphoria. Although it might not be too difficult to reproduce in wxEuphoria. It's really just a low-level event handler for mouse movements.
-Greg
Thanks Greg and Buzzo.
I suspected that w32HMouseTrap was only in Win32Lib because there is no documentation for it in wxEuphoria.
I will work on Greg's suggestion. It seems a horrendous task. I suppose I will have to convert all my 15 comboboxes to reside within a grid of 1x15, and then define all the parameters which the mouse might visit to open the comboboxes, and before clicking the combobox should open if I simulate "open combo box" event. That last part might be difficult. I have about 15 comboboxes with 6-17 items in each, at present occupying very little real estate. At one point I did have these 120 or so items displayed nicely in a grid of 15 rows, 20 columns, but that was rejected because it occupied too much real estate.