AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas para móviles / Funciones Multi-Touch
  • Limitations
  • Miscellaneous
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Returns the horizontal position of the pointer (finger or stylus). The returned value depends on how the function is used:
  • Used in an event linked to the movement of the pointer (click, move, pressed, released, etc.), returns the horizontal position (X) of the pointer (finger or stylus) in relation to the control or window.
  • Used in another event or process, returns the last known position of the pointer in the control.
  • If the device supports the multi-touch movements, used to retrieve the position of a specific contact point.
Some examples of use For example, you can find out:
  • the position of the pointer (finger or stylus) when clicking on a Image control (function used in the "Click" event of the Image control).
  • the position of the pointer (finger or stylus) during its move on the surface of a control (function used in the optional event "Rollover" of a control).
  • the position of the Nth pointer during a multi-touch movement on the surface of a control (if it is supported by the device).
Ejemplo
// Position of the pointer (finger or stylus) during a click in an Image control
PositionX is int = GesturePosX(1, gpControl)
// Position of the second pointer pressed on the surface of a control
PositionX is int = GesturePosX(2, gpControl)
// Position of the pointer in relation to the upper-left corner of the image displayed by the control
// when this image is not entirely displayed
PositionX is int = GesturePosX(1, gpImage)
Sintaxis
<Result> = GesturePosX([<Pointer subscript> [, <Marker>]])
<Result>: Integer
  • Horizontal position (or X-coordinate) in pixels of the pointer in relation to the relevant marker,
  • -1 if an error occurred.
<Pointer subscript>: Optional integer
Index of the pointer (finger) whose horizontal position must be retrieved. The first pointer in contact with the screen has index 1.
If this parameter is not specified, the function will return the position of the first pointer in contact with the screen.
If the index does not correspond to a pointer in contact with the screen or if the specified index is greater than 1 and if the device does not support the multi-touch, the function will return -1.
<Marker>: Optional Integer constant
Marker used to calculate the position:
gpControl
(default value)
Position of the pointer in relation to the upper-left corner of the control (or window if the event occurred on the window).
gpImagePosition of the pointer in relation to the upper-left corner of the image displayed by an Image control.

This constant can be used when an image is not entirely displayed in an Image control in order to find out the position of the pointer in the source image (while taking the possible zoom into account).

This constant should only be used when GesturePosX is called in an event associated with an Image control. Otherwise, GesturePosX will return -1.
gpPagePosition of the pointer in relation to the upper-left corner of the page to which belongs the control on which the event occurred.
gpScreenPosition of the pointer in the screen (in relation to the upper-left corner of the screen).
gpWindowPosition of the pointer in relation to the upper-left corner of the window to which belongs the control on which the event occurred.
WEBDEV - Código Navegador This constant is not available
Observaciones

Limitations

  • WEBDEV - Código Navegador The browser used must support the multi-touch feature.

Miscellaneous

  • To find out the vertical position (Y) of a pointer, use GesturePosY.
  • To find out the number of pointers in contact with the screen, use GestureNbPointer.
  • To find out the index of the pointer that triggered the execution of a process linked to a movement on the screen, use GestureCurrentPointer.
Componente: WDJS.DLL
Versión mínima requerida
  • Versión 17
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local