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 / Controles, páginas y ventanas / Funciones de controles
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
WEBDEV - Server codeWindows This function is available only to simplify the Webification of WINDEV projects.
Example
// Récupère la taille et la position d'un champ telles qu'elles ont été définies sous l'éditeur
nX is int = CoordinateScreenToEditor(MonChampSaisie.X)
nY is int = CoordinateScreenToEditor(MonChampSaisie.Y)
nLargeur is int = CoordinateScreenToEditor(MonChampSaisie.Largeur)
nHauteur is int = CoordinateScreenToEditor(MonChampSaisie.Hauteur)
Syntax
<Result> = CoordinateScreenToEditor(<Value>)
<Result>: Integer
Conversion result: converted size or position in the reference dpi under the editor (160 dpi).
WEBDEV - Server code This parameter always corresponds to <Value>.
<Value>: Integer
Value to convert: given size or position in the device's native screen 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/iPad 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.
  • CoordinateEditorToScreen allows making the inverted conversion, i.e., from the reference dpi in the editor (160 dpi) to the native dpi of the device on which the application is run.
Component: wd300obj.dll
Versión mínima requerida
  • Versión 20
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