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
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
A Sliding Banner control can be handled through programming. 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 handle a Sliding Banner control through programming, WEBDEV proposes the Sliding Banner control functions.
This help page explains how to handle a Sliding Banner control through programming.
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 BannerStartSliding 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 BannerStopSliding.

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:
    BannerFirstDisplays the first plane of a Sliding Banner control.
    BannerLastDisplays the last plane of a Sliding Banner control.
    BannerNextDisplays the next plane of a Sliding Banner control.
    BannerPreviousDisplays the previous plane of a Sliding Banner control.
    Remark: The invisible planes are ignored.
  • by using Value to display the desired plane.
    For example:
    // Displays plane 3 in the Sliding Banner control
    BAN_Banner.Value = 3
  • by assigning the value of the desired plane to the Sliding Banner control.
    For example:
    NameSlidingBannerControl = PlaneNumber
Remark: The plane numbers and their order are defined in the description window of the Sliding Banner control.
Handling the planes of a Sliding Banner control

Making a plane invisible

You can use Visible to make a plane visible (and conversely). 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:
TodayDate is Date
IF TodayDate.Month = 8 THEN
BAN_Ad[5].Visible = False
END
Tip: You can prepare a plane (for a promotion for example) and to make it visible at 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:
    ActivePlaneNum = NameSlidingBannerControl
  • 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 Properties associated with Sliding Banner controls.
Minimum version required
  • Version 22
Comments
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help