Control - TouchChange Event

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

Member of Control (PRIM_CTRL)

Parameters

Name

Type

Data Type

Description

MoveLeft

*Input

Decimal

Returns the number of pixels moved horizontally for each instance of the TouchChange event

MoveTop

*Input

Decimal

Returns the number of pixels moved vertically for each instance of the TouchChange event

ScaleWidth

*Input

Decimal

Returns the percentage scale width change for each instance of the TouchChange event

ScaleHeight

*Input

Decimal

Returns the percentage scale height change for each instance of the TouchChange event

Rotation

*Input

Decimal

Returns the rotation change in degrees for each instance of the TouchChange event

Continue

*Both

Boolean

Allow 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

  • No labels