ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
CoordinateEditorToScreen (Function)
In french: CoordonnéeEditeurVersEcran
Converts a size or a position specified in the reference dpi in the editor (160 dpi) to the native dpi of screen on the device where the application is run.
This function is mainly used to perform a positioning at pixel level.
Example
EmulateMouse(FEN_Test.IMG_Circuit, emLeftClick, ...
	CoordinateEditorToScreen(68), CoordinateEditorToScreen(43))
EmulateMouse(FEN_Test.IMG_Circuit, emLeftClick, ...
	CoordinateEditorToScreen(259), CoordinateEditorToScreen(45))
EmulateMouse(FEN_Test.IMG_Circuit, emLeftClick, ...
		CoordinateEditorToScreen(161), CoordinateEditorToScreen(139))
EmulateMouse(FEN_Test.BTN_Valider, emLeftClick)
Syntax
<Result> = CoordinateEditorToScreen(<Value>)
<Result>: Integer
Conversion result: converted size or position in the device's native screen dpi.
<Value>: Integer
Value to convert: size or position given in the reference dpi under the editor (160 dpi).
Remarks
  • WINDEV Mobile Under the editor, the sizes and positions of Android or iPhone window fields always correspond to a 160 dpi (dot per inch) screen.
  • AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst When running the application, these sizes and positions are automatically converted according to the native dpi of the screen on the host device. This allows you to get a WYSIWYG rendering regardless of the device dpi.
    For example, if a control is 100x100 in the editor, at runtime it will be 150x150 on a 240 dpi screen, 200x200 on a 320 dpi screen, etc.
  • CoordinateScreenToEditor makes the opposite conversion, i.e., go from the native dpi of the device where the application is run to the reference dpi in the editor (160 dpi).
  • CoordinateEditorToScreen must not be used with the drawing functions. Indeed, the DPI of the device may differ from the scale factor used by the drawing functions.
Component: wd300obj.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help