ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions
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
For a given position in a Word Processing control (coordinates of a control point), returns one of the following:
  • the number of the corresponding page,
  • the corresponding X-position (in mm),
  • the corresponding Y-position (in mm).
Example
// Page number
nPage is int
nPage = DocInfoXY(WP_MyDocument, docPageNumber, MouseXPos(), MouseYPos())
Trace("Page number: ", nPage)
 
// X position
rXPos is real
rXPos = DocInfoXY(WP_MyDocument, docXCoord, MouseXPos(), MouseYPos())
Trace("X position in mm: ", rXPos)
 
// Y position
rYPos is real
rYPos = DocInfoXY(WP_MyDocument, docYCoord, MouseXPos(), MouseYPos())
Trace("Y position in mm: ", rYPos)
Syntax
<Result> = DocInfoXY(<Word Processing control> , <Type of information> , <X> , <Y>)
<Result>: Real
Requested information.
<Word Processing control>: Control name
Name of the Word Processing control to use.
If this parameter corresponds to an empty string (""), the control to which the current event belongs will be used.
<Type of information>: Integer constant
Requested type of information:
docOriginScreenBy default, (0,0) corresponds to row 1, column 1 of the Word Processing control (scrollbars located at the origin).
If the docOriginScreen constant is combined with the previous constants, (0,0) corresponds to the origin of the screen.
This constant cannot be used on its own.
docPageNumberNumber of the page that contains the specified position.
docXCoordX-coordinate of the specified position on the page (expressed in millimetres).
docYCoordY-coordinate of the specified position on the page (expressed in millimetres).
<X>: Integer
X-coordinate (in pixels) to be analyzed. This coordinate is relative to the control (if the docOriginScreen constant is not specified).
<Y>: Integer
Y-coordinate (in pixels) to be analyzed. This coordinate is relative to the control (if the docOriginScreen constant is not specified).
Business / UI classification: Business Logic
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help