ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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 reinitializing the content of an Image Editor control
  • Setting the default options in an Image Editor control
  • Handling the image displayed in the Image Editor control
  • Associated WLanguage properties
  • Properties specific to the management of Image Editor controls
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
Overview
WINDEV allows you to handle an Image Editor control through programming. To do so, use the control variable in the code.
Image Editor controls can also be handled 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 handle an Image Editor control through programming.
Displaying an image in an Image Editor control
To display an image in an Image Editor control, you can:
  • use an assignment (direct or by variable) with path of image file.
    // Direct assignment
    IE_MyImage = "C:\Temp\MyImage.gif"
    // Assignment by variable
    ImagePath = fCurrentDir() + "\MyImage.gif"
    IE_MyImage = ImagePath
  • use an assignment with an Image variable.
    MyImage is Image
    // Load from a file
    MyImage = dLoadImage("image.png")
    // Assign the Image Editor control
    IE_MyImage = MyImage
Remark: To get the path of the image file displayed in an Image Editor control, use the FilePath property.
Clearing or reinitializing the content of an Image Editor control
To clear or reinitialize an Image Editor control, all you have to do is assign an empty string to the Image Editor control. For example:
IE_MyImage = ""
Remark: You can also use PicClose.
Setting the default options in an Image Editor control
You can:
  • 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.
Handling the image displayed in the Image Editor control
To handle the image found in the Image Editor control, we recommend that you use an Imagevariable. Then, all the drawing functions can be used on this Image variable. To update the Image Editor control, all you have to do is assign the control with the Image variable.
It is also possible to use a variable of type WDPic. This variable is mainly used to manage the display of layers in a ".wdpic" file.
Associated WLanguage properties

Properties specific to the management of Image Editor controls

The following properties are used to manage the characteristics of an Image Editor control through programming:
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 an Image Editor control, see Properties associated with Image Editor controls.
Minimum version required
  • Version 23
Comments
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help