AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Imagen
  • Overview
  • Page control
  • Using an image with automatic sequence in a WEBDEV site
  • Programming an image with automatic sequence
  • Overview
  • Definition of images to be displayed in the sequence
  • WLanguage functions
  • WLanguage properties
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview

Page control

Image controls with automatic sequence are used to view a series of images located in one or more site directories. The images are automatically browsed.
The change of images can be done automatically or manually (via the WLanguage functions).
Transition effects can be applied.
This allows you to easily create advertising banners or slide shows.
The automatic sequence is available for the following controls:
  • Image control.
  • Clickable Image control.
  • Thumbnail control.
Note: If the different images used by the automation dequeue have different sizes, the display mode specified in the "General" tab of the field is automatically applied..
Using an image with automatic sequence in a WEBDEV site
To use an image with automatic scroll in a WEBDEV website:
  1. Create an Image control.
  2. Open the control description window ("Description" in the context menu of the Image control).
  3. In the "UI" tab, in the "Automatic scrolling" area, check the "Deslizar imágenes de un directorio o lista programada" option, then specify the various scrolling options:
    • Duración entre imágenes: indicates image display delay..
    • Iniciar automáticamente. If this option is not selected, the sequence can be started by ImageStartScrolling.
    • Examinar directorio de la imagen (Pestaña General): This option allows you to browse all images present in the directory currently selected for the Image field (or the directory of the image currently associated with the Image field).. In this case, the path is not recursive: sub-directory images are not browsed..
    • Ordenar contenido del deslizamiento: This option displays browsed images by name.. Select (if necessary) the browse directory of images ("Image" control.
  4. Validate the control description window.
If you have set the sequence to start automatically and specified an image directory, the sequence will start automatically when testing the page.
Note: It is possible to combine transition effects with.
Programming an image with automatic sequence

Overview

The controls with an automatic sequence can be handled programmatically via several WLanguage properties and functions. These functions and properties are also available in browser code and in PHP.

Definition of images to be displayed in the sequence

The images displayed in the control during the sequence can be:
  • found in the directory selected in the control description window.
  • associated with the control through programming. Examples:
    • A list of images is associated with the control:
      // Affectation en code serveur
      IMG_Image = "chiffres_0.png" + CR + "chiffres_1.png" + CR + ...
      		"chiffres_2.png" + CR + "chiffres_3.png"
    • A directory containing images is associated with the control:
      IMG_Image = "images"
      This code is used to associate a set of images or a directory with the control. The path is relative to the directory of site images (_WEB directory).

WLanguage functions

Several WLanguage functions are used to handle the images in an automatic sequence. These functions are as follows:
ImageFirstMuestra el primer Image para el pergamino.
ImageLastMuestra el último Image para el pergamino.
ImageNextMuestra la siguiente Image para el pergamino.
ImageOccurrenceDevuelve el número total de imágenes que tiene en cuenta el scroll.
ImagePreviousMuestra el anterior Image para el pergamino.
ImageScrollingPositionDevuelve la Image visualizada.
ImageStartScrollingInicia el ciclo de imágenes.
ImageStopScrollingDetiene el deslizamiento automatic Image.
Example of scroll programming:
// Program images in the sliding banner.
// Ability to specify the image directory
// The first time, the first image is selected at random.
// =================
// Declaration of global variables
gnNumberSlideImages is int
gnStartingImage is int
gsSlideImageName is string
 
// Page initialization
<BLOCK Sliding Banner>
gsSlideImageName = fListFile(fWebDir() + fSep + "Home banner" +
fSep + "*.jpg", frNotRecursive)
FOR EACH STRING sAFile OF gsSlideImageName SEPARATED BY CR
gnNumberSlideImages++
END
InitRandom()
gnStartingImage = Random(1, gnNumberSlideImages)
 
NumSlideStartingImage is int = gnStartingImage
 
FOR I = 1 TO NumSlideStartingImage
ImageNext(IMG_Overview)
END
ImageStartScrolling(IMG_Overview)
<END>

WLanguage properties

Several WLanguage properties are used to handle the images in an automatic sequence. These properties are as follows:
DisplayedValueReturns the path of image currently displayed.
SortedDetermines whether the control sorts the images during the sequence and sorts the images.
SortOptionUsed to define image sorting mode for the sequence.
ValueReturns the path of image directory.
Versión mínima requerida
  • Versión 16
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 19/09/2024

Señalar un error o enviar una sugerencia | Ayuda local