ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • How zoom works
  • Limitation
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Zoom property gets or sets the zoom value:
  • AndroidAndroid Widget iPhone/iPadIOS Widget in an Image control. The management of automatic scrollbars and zoom must be enabled in this Image control ("Automatic scrollbars and zoom" in the "Details" tab of the control description window).
  • AndroidiPhone/iPad in a Map control.
  • AndroidiPhone/iPad in a PDF Reader control.
  • AndroidiPhone/iPad in a Camera control.
    Note: This property can only be used for camera fields that are not in "26 compatible mode"..
Example
AndroidAndroid Widget iPhone/iPadIOS Widget
// Effectue un zoom à 40% du fichier PDF affiché dans le champ Image
IMG_Image_PDF.Zoom = 40
Syntax

Getting the zoom value Hide the details

<Result> = <Element used>.Zoom
<Result>: Integer
Zoom factor in the control. This value corresponds to:
  • AndroidiPhone/iPadIOS Widget In an Image field: at zoom percentage.
  • AndroidiPhone/iPadIOS Widget In a Map control: to a value between 1 (display of the whole earth) and 21.
  • AndroidiPhone/iPadIOS Widget In a PDF Reader control field: zoom percentage.
  • AndroidiPhone/iPad In a Camera field: to a value between the MinZoom and MaxZoom property values.
<Element used>: Control name or window name
Name of element to use:
  • AndroidiPhone/iPadIOS Widget Name of the Image control.
  • AndroidiPhone/iPadIOS Widget Name of the Map control.
  • AndroidiPhone/iPadIOS Widget Name of the PDF Reader control.
  • AndroidiPhone/iPad Name of the Camera control.

Changing the zoom value Hide the details

<Element used>.Zoom = <New zoom>
<Element used>: Control name or window name
Name of element to use:
  • AndroidiPhone/iPadIOS Widget Name of the Image control.
  • AndroidiPhone/iPadIOS Widget Name of the Map control.
  • AndroidiPhone/iPadIOS Widget Name of the PDF Reader control.
  • AndroidiPhone/iPad Name of the Camera control.
<New zoom>: Integer or Integer constant
New zoom value that will be applied to the element.
AndroidiPhone/iPadIOS Widget For a PDF Reader control, this value can correspond to:
  • a percentage.
  • one of the following constants:
    zoomAdaptHeightDisplays the PDF file at full height in the PDF Reader control.
    zoomAdaptSizeDisplays the entire PDF file in the PDF Reader control.
    zoomAdaptWidthDisplays the PDF file at full width in the PDF Reader control.
Note: when a new PDF file is loaded into the field, the zoom value is not retained..
AndroidiPhone/iPadIOS Widget For an Image control, this value can correspond to:
  • a percentage.
  • one of the following constants:
    zoomAdaptHeightDisplays the image full height in the Image control.
    zoomAdaptSizeDisplays the entire image in the Image control.
    zoomAdaptWidthDisplays the image full width in the Image control.
Note: when a new image is loaded into the field, the zoom value is not retained..
AndroidiPhone/iPadIOS Widget For a Map control:
  • this value is between 1 (view of the entire Earth) and 21.
  • this value can correspond to the following constant:
    zoomAdaptSizeAdapts the zoom of the Map control to show all the markers at the same time.
AndroidiPhone/iPad For a Camera control, this value is between the values of the MinZoom and MaxZoom properties.
Remarks
AndroidiPhone/iPad

How zoom works

The Zoom property corresponds to a value between the values of the MinZoom and MaxZoom properties . This value corresponds to the magnification factor. For example, if the Zoom property is set to 2, it means that a '2x' zoom is applied.
  • If the value of the Zoom property is greater than that of the MaxZoom property, the zoom takes the value of MaxZoom.
  • If the value of the Zoom property is less than that of the MinZoom property, the zoom takes the value of MinZoom.

Limitation

This property applies only to:
  • Image controls with the "Automatic scrollbars and zoom" option.
  • AndroidiPhone/iPadIOS Widget Map controls.
  • AndroidiPhone/iPadIOS Widget PDF Reader controls.
  • AndroidiPhone/iPad Camera controls.
Related Examples:
The Image control (display a PDF or a TIFF) Unit examples (WINDEV): The Image control (display a PDF or a TIFF)
[ + ] Displaying a PDF or TIFF document in the Image control found in a window.
The Map control Unit examples (WEBDEV): The Map control
[ + ] This example explains how to use the Map control of WEBDEV.
It can be used to display a map that includes markers as well as an itinerary.
The Map control Unit examples (WINDEV): The Map control
[ + ] Using the Map control of WINDEV.
It is used to display a map that includes markers as well as an itinerary.
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help