- Page control
- Using an image with automatic scroll in a WEBDEV site
- Programming an image with automatic scroll
- Definition of the images to display during the scroll
- WLanguage functions
- WLanguage properties
Image with automatic scroll (WEBDEV)
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.
Remark: 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:
- Create an Image control.
- Open the control description window ("Description" in the context menu of the Image control).
- In the "UI" tab, "Automatic scroll" area, check "Scroll images found in a directory or programmed list" and specify the different scroll options:
- Duration between images: indicates the time intervals for displaying the image.
- Start automatically. If this option is not selected, the scroll can be started by ImageStartScrolling.
- Browse image directory (General tab): This option is used to browse all the images located 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: images located in subdirectories are not browsed.
- Sort the content of the scroll: This option is used to display the images browsed according to their name. Select (if necessary) the browse directory of images ("Image" control.
- Validate the control description window.
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.
Remark: Transition effects can be combined with scrolling.
Programming an image with automatic scroll
The controls proposing an automatic scroll can be handled through 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 control description window.
- associated with the control through 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:
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).
Several WLanguage functions are used to manage the images with automatic scroll. These functions are as follows:
Several WLanguage properties are used to manage the images with automatic scroll. These properties are as follows:
|DisplayedValue||Returns the path of image currently displayed.|
|Sorted||Used to find out whether the control sorts the images during the scroll and to sort the images during the scroll.|
|SortOption||Used to define the mode for sorting images during the scroll.|
|Value||Returns the path of image directory.|
Unit examples (WEBDEV): The Image control (animations and transitions)