|
|
|
|
- Overview
- Retrieving the rating displayed in the control
- Modifying the rating displayed in the control
- Properties specific to the management of rating
Handling Rating controls programmatically
WINDEV, WEBDEV and WINDEV Mobile allow you to handle Rating controls programmatically. To do so, use the variable of the Rating control in the code. The variable of the Rating control: - corresponds to the name of the Rating control.
- is initialized with the rating displayed by the Rating control.
Retrieving the rating displayed in the control To retrieve the rating, use the following syntax: <Rating> = <Rating control> <Rating> is an integer or real variable, according to the granularity defined for the ratings in the description window of the control. Remarks: - You can also use the Value property.
- The <Rating> takes into account the specified value per star (in the control description or with the ValuePerStar property).
Modifying the rating displayed in the control To modify the rating, use the following syntax: <Rating control> = <Rating> <Rating> is a value between the minimum and maximum rating of the Rating control. These values have been defined in the control description window or in the code with the MinValue and MaxValue properties. Remarks: - You can also use the Value property.
- Caution: if a value per star is specified (in the control description or with the ValuePerStar property), the <Rating> must take this value into account (value of a star multiplied by the number of stars displayed).
Properties specific to the management of rating The following properties can be used to programmatically handle Rating controls. | | MaxValue | Used to find out and modify the maximum value of a Rating control. | MinValue | Used to find out and modify the minimum value of a Rating control. This property is particularly useful for Rating controls with a "Like/Dislike" feature. | ValuePerStar | Used to find out and modify the value of a star in a Rating control. |
For a complete list of WLanguage properties that can be used with a Rating control, see Properties associated with Rating controls.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|