> Hi,
> I've a main Gridview (grdGame) surrounded by 2 other grids, grdHdef on
> top and grdVdef on left of grdGame
>
> When the mouse cursor is over the main grid, I want to highlight a
> column of the top grid and a row of the left grid facing the cursor
> position.
> How to know at each instant where the cursor is, that is without action
> on any button?
> I cannot use Mouse.X/Y because there is no mouse event
>
> Thank for your help,
>

Yep. The problem is that mouse move are not always generated. It depends on 
the internal implementation of the widget in the toolkit.

What you can do is enabling a timer at Enter event, and disabling it at Leave 
event. Ecah timer the timer is triggered, just use the Mouse.ScreenX and 
Mouse.ScreenY properties to calculate where the cursor is on the GridView.

The right solution would be implementing a "Tracking" property in the Control 
class to tell Gambas that you want MouseMove events even if no mouse button is 
pressed.

Regards,

-- 
Benoît

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to