|
|
|
|
|
- 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
Manipulating Image Editor controls programmatically
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.
EI_MonImage = "C:\Temp\MonImage.gif"
CheminImage = fCurrentDir() + "\MonImage.gif"
EI_MonImage = CheminImage
- assign a variable of type Image.
MonImage is Image
MonImage = dLoadImage("image.png")
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: 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: | | FilePath | La propiedad FilePath permite obtener: - el nombre del archivo xlsx asociado a un control Hoja de cálculo.
- el nombre del archivo asociado a un control Editor de imágenes.
- el nombre del archivo PDF asociado a un control Lector PDF.
- el nombre del archivo DOCX asociado a un control Procesador de texto.
- el nombre del archivo wddiag asociado a un control Editor de diagramas.
| ImageInitialHeight | La propiedad ImageInitialHeight permite obtener o establecer la altura predeterminada de una imagen en un control Editor de imágenes. | ImageInitialWidth | La propiedad ImageInitialWidth permite obtener o establecer el ancho predeterminado de una imagen en un control Editor de imágenes. | ImageType | La propiedad ImageType se utiliza para obtener el tipo de imagen que se está editando en un control Editor de imágenes (icono o imagen). | InitialTool | La propiedad InitialTool permite obtener o cambiar la herramienta de dibujo seleccionada de forma predeterminada en un control Editor de imágenes. | PaneVisible | La propiedad PaneVisible se utiliza para: - determinar si el panel del control Editor de imágenes es visible.,
- muestra u oculta el panel del control Editor de imágenes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|