ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Manipulating Carousel controls programmatically
Overview
WINDEV allows you to manipulate a Carousel control directly by 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", "Order" in this example) is displayed as a hover over the element in the top left corner of the Carousel control.

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 Carousel controls, see Carousel control properties.
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: 09/30/2024

Send a report | Local help