Control - TouchChange Event

Fired repeatedly between the TouchStart and TouchEnd boundaries to provide details of the touch events

Member of Control (PRIM_CTRL)

Parameters

NameTypeData TypeDescription
MoveLeft*InputDecimalReturns the number of pixels moved horizontally for each instance of the TouchChange event
MoveTop*InputDecimalReturns the number of pixels moved vertically for each instance of the TouchChange event
ScaleWidth*InputDecimalReturns the percentage scale width change for each instance of the TouchChange event
ScaleHeight*InputDecimalReturns the percentage scale height change for each instance of the TouchChange event
Rotation*InputDecimalReturns the rotation change in degrees for each instance of the TouchChange event
Continue*BothBooleanAllow touch processing to be stopped if required

Details

The TouchChange event is repeatedly between the TouchStart and TouchEnd boundaries to provide details of the touch events.
 
Having access to the details of a touch event allows the developer to control the nature of the touch processing.

Example

In this example, the code stops an image being moved beyond the bounds of its parent control.
Evtroutine Handling(#Image.TouchChange)
 
   #Image.Top := #Image.Top.Bound( 0 (#Com_owner.Height - #Image.Height))
   #Image.Left := #Image.Left.Bound( 0 (#com_owner.Width - #Image.Width))
 
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2