ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Image Editor control (WINDEV)
  • Overview
  • Displaying an image in an Image Editor control
  • Clearing or resetting the content of an Image Editor control
  • Setting the default options in an Image Editor control
  • Manipulating the image displayed in the Image Editor control
  • Associated WLanguage properties
  • Properties specific to Image Editor controls
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
WINDEV allows you to programmatically manipulate Image Editor controls. To do so, use the control variable in the code.
Image Editor controls can also be manipulated programmatically via Picxxx functions. These functions are used to create, save, open and close an image in an Image Editor control.
This help page explains how to programmatically manipulate Image Editor controls.
Displaying an image in an Image Editor control
To display an image in an Image Editor control, you can:
  • assign the image file directly, or assign the image file path to a variable.
    // Affectation directe
    EI_MonImage = "C:\Temp\MonImage.gif"
    // Affectation par variable
    CheminImage = fCurrentDir() + "\MonImage.gif"
    EI_MonImage = CheminImage
  • assign a variable of type Image.
    MonImage is Image
    // Chargement à partir d'un fichier
    MonImage = dLoadImage("image.png")
    // Affectation du champ Editeur d'images
    EI_MonImage = MonImage
Note: To find out the path of the image file displayed in an Image Editor control, use the FilePath property..
Clearing or resetting the content of an Image Editor control
To clear or reset an Image Editor control, simply assign an empty string to it. For example:
EI_MonImage = ""
Note: You can also use the PicClose function..
Setting the default options in an Image Editor control
It is possible to:
  • define the tool used by default when opening the Image Editor control with the InitialTool property.
  • set the default dimensions when creating a new image in the Image Editor control with the ImageInitialHeight and ImageInitialWidth properties.
Manipulating the image displayed in the Image Editor control
To manipulate the image in the Image Editor control, it is recommended to use a variable of type Image. Then, all the drawing functions can be used on this Image variable. To update the Image Editor control, simply assign the Image variable to it.
It is also possible to use a variable of type WDPic. This variable is mainly used to manage layers in a ".wdpic" file.
Associated WLanguage properties

Properties specific to Image Editor controls

Use the following properties to programmatically manipulate the characteristics of an Image Editor control:
FilePathThe FilePath property gets:
  • the name of the xlsx file associated with a Spreadsheet control.
  • the name of the file associated with an Image Editor control.
  • the name of the PDF file associated with a PDF Reader control.
  • the name of the DOCX file associated with a Word Processing control.
  • the name of the wddiag file associated with a Diagram Editor control.
ImageInitialHeightThe ImageInitialHeight property is used to get and set the default height of the image created in an Image Editor control.
ImageInitialWidthThe ImageInitialWidth property is used to get and set the default width of the image created in an Image Editor control.
ImageTypeThe ImageType property is used to get the type of image being edited in an Image Editor control (icon or image).
InitialToolThe InitialTool property is used to get or change the drawing tool selected by default in an Image Editor control.
PaneVisibleThe PaneVisible property is used to:
  • determine if the pane of the Image Editor control is visible,
  • show or hide the pane of the Image Editor control.
For a complete list of WLanguage properties that can be used with Image Editor controls, see Image Editor control properties.
Minimum version required
  • Version 23
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help