ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Sliding Banner control
  • Overview
  • Sliding and browsing planes
  • Automatic sequence of slides in a Sliding Banner control
  • Changing slides using bullets, and the left and right buttons
  • Customizing transitions between slides
  • Handling the planes of a Sliding Banner control
  • Making a plane invisible
  • Retrieving the current plane
  • Properties available for a Sliding Banner control
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
A Sliding Banner control can be handled programmatically. To do so, use the variable of Sliding Banner control in the code.
The variable of Sliding Banner control corresponds to the number of the active pane. This variable is an integer.
To manipulate a Sliding Banner control through programming, WEBDEV proposes the Sliding Banner control functions.
This help page explains how to programmatically manipulate Sliding Banner controls.
Sliding and browsing planes

Automatic sequence of slides in a Sliding Banner control

To use an automatic sequence in a Sliding Banner control, you can:
  • check "Start sequence automatically" in the "Details" tab of the control description window.
  • use the WLanguage <Sliding Banner>.StartSliding function.
In this case, the different visible planes of Sliding Banner control will be automatically displayed in the control:
  • according to the order defined in the "General" tab of the Sliding Banner control.
  • with the display duration defined in the "General" tab of the Sliding Banner control.
To stop the automatic slide, use <Sliding Banner>.StopSliding.

Changing slides using bullets, and the left and right buttons

If you are using the left and right buttons as well as the bullets proposed in the Sliding Banner control, no specific programming is required. Going from a plane to another one is automatically managed.
Remarks:
  • The order of planes is the one defined in the description window of the Sliding Banner control.
  • The invisible planes are ignored.

Customizing transitions between slides

If you are using specific controls to go from a plane to another one (specific buttons for example, positioned outside control), you have the ability to manage the move from a plane to another one:
  • by using the following WLanguage functions:
    <Sliding Banner>.FirstDisplays the first plane of a Sliding Banner control.
    <Sliding Banner>.LastDisplays the last plane of a Sliding Banner control.
    <Sliding Banner>.NextDisplays the next plane of a Sliding Banner control.
    <Sliding Banner>.PreviousDisplays the previous plane of a Sliding Banner control.
    Note: Invisible planes are not taken into account..
  • by using Value to display the desired plane.
    For example:
    // Affiche le plan 3 dans le champ Bandeau défilant
    BAN_Bannière.Valeur = 3
  • by assigning the value of the desired plane to the Sliding Banner control.
    For example:
    NomChampBandeauDéfilant = NuméroDuPlan
Note: The number of shots and their order is defined in the Sliding Banner control description window..
Handling the planes of a Sliding Banner control

Making a plane invisible

You can use Visible to make a plane visible and vice versa. The visibility of planes is taken into account when browsing the different planes used by the Sliding Banner control (automatic or programmed iteration).
For example, the following code is used to make invisible the plane 5 found in the BAN_Ad control in August:
DateJour is Date
IF DateJour.Mois = 8 THEN
	BAN_Annonce[5].Visible = False
END
Tip: You can prepare a plan (for a promotion, for example) and make it visible only on a given date, for a given period..

Retrieving the current plane

To retrieve the number of the current plane:
  • perform a simple assignment. For example:
    NumPlanActif = NomChampBandeauDéfilant
  • use the Value property.
Properties available for a Sliding Banner control
Several WLanguage properties can be used to handle:
  • the Sliding Banner control.
  • the planes associated with the Sliding Banner control.
To know the entire list of WLanguage properties that can be used with a Sliding Banner control, see Sliding Banner control properties.
Minimum version required
  • Version 23
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help