PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Position of several pointers
  • Limitations
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the vertical position of the pointer (finger or stylus). The returned value depends on how the function is used:
  • Used in an linked event when the pointer moves (click, move, press, release, ...), returns the vertical position (Y) of the pointer (finger or stylus) with respect to the control or the window in question..
  • Used in another event, 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.
Use cases: This allows you to find out:
  • the position of pointer (finger or stylus) during a click in an image (function used in the click code of image).
  • 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).
Versions 18 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 19 and later
WEBDEV - Browser code This function is now available in browser code.
New in version 19
WEBDEV - Browser code This function is now available in browser code.
WEBDEV - Browser code This function is now available in browser code.
Example
// Position du pointeur (doigt ou stylet) lors d'un clic dans un champ Image
nY is int = GesturePosY()
// Position du second pointeur enfoncé sur la surface d'un champ
nY is int = GesturePosY(2)
// Position du pointeur par rapport au coin haut gauche de l'image affichée par le champ
// lorsque cette image n'est pas affichée dans sa totalité
nY is int = GesturePosY(1, gpImage)
Syntax
<Result> = GesturePosY([<Pointer subscript> [, <Marker>]])
<Result>: Integer
  • Vertical position (or Y coordinate) in pixels of the pointer in relation to the relevant marker,
  • -1 if an error occurred.
<Pointer subscript>: Optional integer
Subscript of the pointer (finger) whose vertical position must be retrieved. The first pointer in contact with the screen corresponds to the subscript 1.
If this parameter is not specified, the function will return the position of the first pointer in contact with the screen.
If the subscript does not correspond to a pointer in contact with the screen or if the specified subscript 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 top left corner:
  • of the control,
  • of the window if the event is on the window.
  • of the page if the event is on the page.
gpScreenPosition of the pointer in the screen (in relation to the top left corner of the screen).
gpWindowPosition of the pointer in relation to the top left corner of the window to which belongs the control on which the event occurred.
WEBDEV - Browser code This constant is not available
gpImagePosition of the pointer in relation to the top 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 the GesturePosY function is called in an event associated with an Image control. Otherwise, the function GesturePosY will return -1.
Versions 19 and later
gpPage
New in version 19
gpPage
gpPage
Position of the pointer in relation to the top left corner of the page to which belongs the control on which the event occurred.
AndroidiPhone/iPadIOS WidgetMac Catalyst This constant is not available.
Remarks
Android

Position of several pointers

To manage the position of several pointers on the screen, the device must be multi-touch capable.

Limitations

  • Android In the Android simulator or emulator, the GesturePosY function only retrieves the position of the first pointer.
  • WEBDEV - Browser code The browser used must support the multi-touch feature.

Various

  • To find out the horizontal position (X) of a pointer, use GesturePosX.
  • To find out the number of pointers in contact with the screen, use GestureNbPointer.
  • To find out the subscript of the pointer that triggered the execution of a process linked to a movement on the screen, use GestureCurrentPointer.
Component: WDJS.DLL
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment