Mouse events in studio 4.3

Dave Jobling omnisstuff at tynedalecomputers.com
Tue Dec 2 12:19:59 EST 2014


Thanks Mike, that was a big help.

Dave


-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Michael Mantkowski
Sent: 02 December 2014 14:55
To: 'OmnisDev List - English'
Subject: RE: Mouse events in studio 4.3

Hi Dave,

Yes, we do that.  Below is some code that does what you're asking.  Based on
holding the mouse down and moving it from a start point.  The redraws are
important to keep the screen refreshing and not leaving "trails" all over
the place.

Mike

On evMouseDown
;  Move crop box
Begin reversible block
Calculate $root.$modes.$fixedcursor as kTrue
Calculate $root.$modes.$ccursor as kcursDragObject
End reversible block
Do method HideGrabbers

Calculate lvTopStart as lvHotPictRef.$top
Calculate lvLeftStart as lvHotPictRef.$left
Calculate lvTopMove as mouseover(kMVert)
Calculate lvLeftMove as mouseover(kMHorz)

While mousedn()
Calculate lvTmpTop as lvTopStart+mouseover(kMVert)-lvTopMove
Calculate lvTmpLeft as lvLeftStart+mouseover(kMHorz)-lvLeftMove

If lvTop<>lvTmpTop|lvLeft<>lvTmpLeft
Calculate lvTop as lvTmpTop
Calculate lvLeft as lvTmpLeft
Calculate lvHotPictRef.$top as lvTopStart+(mouseover(kMVert)-lvTopMove)
Calculate lvHotPictRef.$left as lvLeftStart+(mouseover(kMHorz)-lvLeftMove)
Do lvPictRef.$redraw(kFalse,kTrue)
Do lvHotPictRef.$redraw(kTrue,kTrue)
End If
End While
Do method MoveGrabBars

*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************



-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Dave Jobling
Sent: Tuesday, December 02, 2014 8:33 AM
To: OmnisDev List - English (omnisdev-en at lists.omnis-dev.com)
Subject: Mouse events in studio 4.3

Hi

I am using  'evMouseDown' and ' evMouseUp' to draw objects (such as kOval)
on the screen.  I am using these events to calculate the start and end point
of the object.

I would like to be able to display the object as the user drags the mouse so
that the user can see exactly what is going to be displayed when they leave
go of the button.

I don't know if there is an event available to allow me to do this.  Has
anybody done anything similar?

Thanks

Dave Jobling.

________________________________

No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2012.0.2249 / Virus Database: 4189/8166 - Release Date: 12/02/14
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com

_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2249 / Virus Database: 4189/8166 - Release Date: 12/02/14

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2249 / Virus Database: 4189/8166 - Release Date: 12/02/14


More information about the omnisdev-en mailing list