ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Carousel control
  • Overview
  • Populating a Carousel control
  • Assigning a value to an element
  • Populating a Carousel control
  • Clearing a Carousel control
  • Removing elements from a Carousel control
  • Properties specific to Carousel controls
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
Handling a Carousel control through programming
Overview
WINDEV allows you to handle a Carousel control through programming. To do so, use the variable of the Carousel control in the code.
The Carousel and ListView controls use the same group of functions (ListXXX).
Populating a Carousel control

Assigning a value to an element

To assign an initial value to an element in a Carousel control, use ListAdd.
// Add elements
ListAdd(CAR_Carousel, "Customer", "Customer.gif")
ListAdd(CAR_Carousel, "Order", "Order.gif")
Remark: The label ("Customer" or "Order" in this example) is displayed in the upper-left corner of the Carousel control when the element is hovered hover.

Populating a Carousel control

To assign values to a Carousel control, use an iteration loop to initialize all the elements in the control. For example:
i is int
FOR i = 1 TO 52
ListAdd(CAR_Carousel, Name[i], CarouselImage[i])
END
Clearing a Carousel control

Removing elements from a Carousel control

To remove all elements, use ListDeleteAll.
// Remove all elements from the Carousel control
ListDeleteAll(CAR_Carousel)
Properties specific to Carousel controls
The following properties are used to manipulate a Carousel control programmatically.
AnimationStop or resumes the animation of the Carousel control.
AnimationPeriodAllows you to get and change the rotation speed of a Carousel control.
InitialAnimationAllows you to configure the animation of the Carousel control when it is initialized.
ObserverOrientationAllows you identify and change the secondary angle of a Carousel control. This secondary angle makes the Carousel control "lean".

For a complete list of WLanguage properties that can be used with a Carousel control, see Properties associated with a Carousel control.
Minimum version required
  • Version 11
Comments
Video Carousel ListAdd
https://youtu.be/o51TABWrHG4

https://windevdesenvolvimento.blogspot.com/2019/03/dicas-2048-windev-carousel-2-listadd.html

// BTN_CAROUSEL_LISTADD

ListAdd(CAR_carrosel, "Empresa", "c:\imagens\empresa.png")

amarildo
18 Mar. 2019

Last update: 01/23/2023

Send a report | Local help