PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
CoordinateScreenToEditor (Function)
In French: CoordonnéeEcranVersEditeur
Converts a size or a position specified in the native dpi of the screen on the device where the application is run to the reference dpi in the editor (160 dpi).
This function is mainly used to perform a positioning at pixel level.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWindowsLinux This function is now available for the WINDEV applications in Windows and in Linux.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWindowsLinux This function is now available for the WINDEV applications in Windows and in Linux.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWindowsLinux This function is now available for the WINDEV applications in Windows and in Linux.
Example
// Retrieves the size and position of a control as they have been defined in the editor
nX is int = CoordinateScreenToEditor(MyControl..X)
nY is int = CoordinateScreenToEditor(MyControl..Y)
nWidth is int = CoordinateScreenToEditor(MyControl..Width)
nHeight is int = CoordinateScreenToEditor(MyControl..Height)
Syntax
<Result> = CoordinateScreenToEditor(<Value>)
<Result>: Integer
Conversion result: size or position converted into the reference dpi in the editor (160 dpi).
<Value>: Integer
Value to convert: size or position specified in the native dpi of the device screen.
Remarks
  • WINDEV Mobile In the editor, the sizes and positions of controls in the Android, iPhone or Windows Mobile windows always correspond to a screen in 160 dpi (dot per inch). WINDEV Mobile In the editor, the sizes and positions of controls in the Android, iPhone, Universal Windows 10 App or Windows Mobile windows always correspond to a screen in 160 dpi (dot per inch).
  • AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App 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 the size of a control is equal to 100x100 in the editor, its size at run time will be set to 150x150 on a device in 240 dpi, to 200x200 on a device in 320 dpi, etc.
  • CoordinateEditorToScreen is used to perform the reverse conversion, which means from the reference dpi in the editor (160 dpi) to the native dpi of the screen on the device where the application is run.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment