TCursorTool trap events
Posted: Wed May 26, 2010 12:11 pm
Hi,
Currently I am using TCursorTool.OnChange to detect change and do some operations. I have problems that OnChange event is called too fast or to many times. I would actually need one event which is fired when move of cursor is done. As I see OnChange is fired everytime the mouse moves which is problem for my application. I need to filter that somehow that OnChange would be fired only when change was made and mouse button is not down anymore. This mean that change would appear only when I stop to move cursor and unpress mouse button.
Now it is like:
1. Mouse button pressed to grab cursor
2. Mouse is moving (and cursor) so fire event OnChange
but I would need this way:
1. Mouse button pressed to grab cursor
2. Mouse is moving (and cursor)
3. Mouse button is up so stop moving cursor
4. If cursor new position differe from prevous position fire event OnChange
Does cursor tool offer any solutions to that (I cannot use snap while I have many points)? What do you suggest? Is possible somehow to trap that mouse events?
Thanks.
Br,
PoLabs
Currently I am using TCursorTool.OnChange to detect change and do some operations. I have problems that OnChange event is called too fast or to many times. I would actually need one event which is fired when move of cursor is done. As I see OnChange is fired everytime the mouse moves which is problem for my application. I need to filter that somehow that OnChange would be fired only when change was made and mouse button is not down anymore. This mean that change would appear only when I stop to move cursor and unpress mouse button.
Now it is like:
1. Mouse button pressed to grab cursor
2. Mouse is moving (and cursor) so fire event OnChange
but I would need this way:
1. Mouse button pressed to grab cursor
2. Mouse is moving (and cursor)
3. Mouse button is up so stop moving cursor
4. If cursor new position differe from prevous position fire event OnChange
Does cursor tool offer any solutions to that (I cannot use snap while I have many points)? What do you suggest? Is possible somehow to trap that mouse events?
Thanks.
Br,
PoLabs