PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Page control
  • Using an image with automatic scroll in a WEBDEV site
  • Programming an image with automatic scroll
  • Overview
  • Definition of the images to display during the scroll
  • WLanguage functions
  • WLanguage properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview

Page control

The Image control with automatic scroll is used to view a set of images found 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 scroll is proposed for the following controls:
  • Image control.
  • Clickable Image control.
  • Thumbnail control.
Note: If the different images used by the automatic scroll have different sizes, the display mode specified in the "General" tab of control is automatically applied.
Using an image with automatic scroll in a WEBDEV site
To use an image with automatic scroll in a WEBDEV site:
  1. Create an Image control.
  2. Display the description window of control ("Description" from the popup menu of Image control).
  3. In the "General" tab, select the image type:
    • Dynamic image.
    • Image from a database: path.
    These two types of images propose to manage the automatic scroll. The area regarding the transitions and the automatic scroll is ungrayed if one of these two types of images is selected.
  4. Check "Enable the automatic scroll of images" and specify the different options regarding the scroll:
    • Duration between images.
    • Start the scroll automatically. If this option is not selected, the scroll can be started by ImageStartScrolling.
    • Automatically browse the image directory. This option is used to browse all the images found in the directory currently selected for the Image control (or the directory of the image currently associated with the Image control). In this case, the browse is not recursive: the images found in the sub-directories are not browsed.
    • Sort the content during the scroll. This option is used to display the images browsed according to their name.
  5. Select (if necessary) the browse directory of images ("Directory" control). Select (if necessary) the browse directory of images ("Image" control).
  6. Validate the description window of control.
If you have chosen an automatic startup of the scroll and a directory of images, the scroll is automatically performed during the test of the page.
Note: The transition effects can be combined with the scroll.
Programming an image with automatic scroll

Overview

The controls proposing an automatic scroll can be handled by programming via several WLanguage properties and functions. These functions and properties are also available in browser code and in PHP.

Definition of the images to display during the scroll

The images displayed in the control during the scroll can be:
  • found in the directory selected in the description window of the control.
  • associated with the control by programming. Examples:
    • A list of images is associated with the control:
      // Assignment in server code
      IMG_Image = "digits_0.png" + CR + "digits_1.png" + CR +  ...
      "digits_2.png" + CR + "digits_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 manage the images with automatic scroll. These functions are as follows:
Versions 16 and later
ImageFirst
New in version 16
ImageFirst
ImageFirst
Displays the first image for the scroll.
Versions 16 and later
ImageLast
New in version 16
ImageLast
ImageLast
Displays the last image for the scroll.
Versions 16 and later
ImageNext
New in version 16
ImageNext
ImageNext
Displays the next image for the scroll.
Versions 16 and later
ImageOccurrence
New in version 16
ImageOccurrence
ImageOccurrence
Returns the total number of images taken into account by the scroll.
Versions 16 and later
ImagePrevious
New in version 16
ImagePrevious
ImagePrevious
Displays the previous image of scrolling.
Versions 16 and later
ImageScrollingPosition
New in version 16
ImageScrollingPosition
ImageScrollingPosition
Returns the image displayed.
Versions 16 and later
ImageStartScrolling
New in version 16
ImageStartScrolling
ImageStartScrolling
Starts the automatic scroll of images.
Versions 16 and later
ImageStopScrolling
New in version 16
ImageStopScrolling
ImageStopScrolling
Stops the automatic scroll of images.

WLanguage properties

Several WLanguage properties are used to manage the images with automatic scroll. These properties are as follows:
SortOptionUsed to define the mode for sorting images during the scroll.
SortedUsed to find out whether the control sorts the images during the scroll and to sort the images during the scroll.
ValueReturns the path of image directory.
DisplayedValueReturns the path of the image currently displayed.
Related Examples:
The Image control (animations and transitions) Unit examples (WEBDEV): The Image control (animations and transitions)
[ + ] Presenting animation and effect features proposed in WEBDEV and WLanguage on the Image control.
Minimum required version
  • Version 16
Comments
Click [Add] to post a comment