ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Drawing functions, zoom and automatic scrollbars
  • Limitation
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
The Zoom property gets or sets the zoom value:
  • WINDEV 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).
  • WINDEVUniversal Windows 10 App in a Map control.
  • WINDEV in an Organization Chart control.
  • WINDEV in a Table, TreeView Table, Pivot Table, Spreadsheet or List Box control.
  • WINDEV in a window.
  • WINDEV in a Word Processing control.
  • WINDEV in a PDF Reader control.
  • WINDEV in a Diagram Editor control.
Example
WINDEV
// 40% zoom on the PDF file displayed in the Image control
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:
  • WINDEV In an Image control: the zoom percentage.
  • WINDEV In an Organization Chart control: the zoom percentage.
  • WINDEV In a Table, TreeView Table, Pivot Table or Spreadsheet control: the zoom percentage.
  • WINDEVUniversal Windows 10 App In a Map control: a value between 1 (view of the entire Earth) and 21.
  • WINDEV In a window: the zoom percentage.
  • WINDEV In a Word Processing control: the zoom percentage.
  • WINDEV In a PDF Reader control: the zoom percentage.
  • WINDEV In a Diagram Editor control: the zoom percentage.
<Element used>: Control name or window name
Name of the element to be used:
  • WINDEV Name of the Image control.
  • WINDEV Name of the Organization Chart control.
  • WINDEVUniversal Windows 10 App Name of the Map control.
  • WINDEV Name of the Table, TreeView Table, Pivot Table, Spreadsheet or List Box control.
  • WINDEV Name of the window.
  • WINDEV Name of the Word Processing control.
  • WINDEV Name of the PDF Reader control.
  • WINDEV Name of the Diagram Editor control.

Changing the zoom value Hide the details

<Element used>.Zoom = <New zoom>
<Element used>: Control name or window name
Name of the element to be used:
  • WINDEV Name of the Image control.
  • WINDEV Name of the Organization Chart control.
  • WINDEVUniversal Windows 10 App Name of the Map control.
  • WINDEV Name of the Table, TreeView Table, Pivot Table, Spreadsheet or List Box control.
  • WINDEV Name of the window.
  • WINDEV Name of the Word Processing control.
  • WINDEV Name of the PDF Reader control.
  • WINDEV Name of the Diagram Editor control.
<New zoom>: Integer or Integer constant
New zoom value that will be applied to the element.
WINDEV 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.
Remark: the zoom value is lost when a new PDF file is loaded in the control.
WINDEV 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.
Remark: the zoom value is lost when a new image is loaded in the control.
WINDEVUniversal Windows 10 App 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.
WINDEV For an Organization Chart control, this value corresponds to a percentage.
WINDEV For a Table, TreeView Table, Pivot Table, Spreadsheet or List Box control: this value corresponds to a percentage.
WINDEV For a window, this value corresponds to a percentage.
WINDEV For a Word Processing control, this value corresponds to a percentage.
WINDEV For a Diagram Editor control, this value corresponds to the zoom percentage.
Remarks
WINDEVWindowsUser code (UMC)

Drawing functions, zoom and automatic scrollbars

The "Automatic scrollbars and zoom" option, available for Image controls, is not compatible with dStartDrawing. If this option is used on the Image control, dStartDrawing freezes the image in the control. The zoom is also fixed. The standard behavior is restored when dEndDrawing is called.
You can get the same effect with dPixelColor and dRotation.

Limitation

This property applies only to:
  • Image controls with the "Automatic scrollbars and zoom" option.
  • WINDEVUniversal Windows 10 App Map controls.
  • WINDEV Organization Chart controls.
  • WINDEV Table, TreeView Table, Pivot Table, Spreadsheet or List Box controls.
  • WINDEV windows
  • WINDEV Word Processing controls.
  • WINDEV PDF Reader 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: 06/22/2023

Send a report | Local help