ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rating control
  • Overview
  • Control in a window or page
  • Creating a Rating control
  • Characteristics of Rating 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

Control in a window or page

The Rating control allows the user to:
  • indicate the popularity level of an element via repeated icons.
  • find out the popularity level of an element via repeated icons.
In most cases, this type of control presents the popularity level as a rating from 1 to 5 stars:
It can also be used to indicate a user choice:
WINDEV and WEBDEV give you the ability to:
  • use any number of pictograms.
  • use any shape of icon. For example, you have the ability to use images from the image catalog.
Creating a Rating control
To create a Rating control:
  1. On the "Creation" tab, in the "Graphic controls" group, click "Rating".
  2. Click where the control will be created in the window or page. The control appears in the editor.
Tip: You can also create a "preset" Rating control by clicking the arrow found on the right of "Rating" option. The list of available controls is displayed with the project skin template. Simply click the control you want to create in the editor.
To view the characteristics of the control, select "Description" in the context menu.
Characteristics of Rating control
The "General" tab in the Rating control description window allows defining the characteristics of the control:
  • The maximum possible mark: is used to define the number of icon repetitions in the Rating control. This option is available in "Same image for each mark" mode only.
  • The number of marks in the image: indicates the number of icons found in the image. This option is available only if the layout of the image set uses the "Different image for each mark" mode.
  • The initial mark, which means the mark used when the control is displayed.
  • The granularity of marks. This option corresponds to the mode for selecting the marks. The rating can evolve:
    • by integer value: the mark will evolve by 1 at a time
    • by half-value: the mark will evolve by 0,5 at a time.
    • by real value: the mark will evolve according to the value typed by the user.
  • WINDEV The value of a 'star' : value associated with a star (or any other symbol). The value of the Rating control will correspond to the value of a star multiplied by the number of stars displayed.
  • The image of marks: Image used to view the marks. If this parameter is not specified, the image of a star is used by default. The Drop-down button button is used to select:
  • an image accessible from your computer ("Browse" option).
  • an image in the image catalog ("Catalog" option). In this case, the selected image is automatically adapted to the specified options.
  • Image set distribution: used to define the mode for dividing the control image set:
    • Same image for each mark: The image must contain a single icon (represented by several states). The repetition of the icon will be used to represent the different possible values in the control.
    • Different image for each mark: The image must contain several icons (each one being represented by several states). Each icon will be used to represent the different possible values in the control. In this mode, the maximum mark corresponds to the number of icons contained in the image.
  • Graphically differentiate marks below the current mark:
    • When this mode is disabled, the marks below the current mark are displayed like the current mark.
    • When this mode is enabled, the marks below the current mark are drawn by using the state 0 of the image set (the marks below the current mark will be invisible if the image contains a single state).
Related Examples:
The Rating control Unit examples (WINDEV): The Rating control
[ + ] Using a Rating control
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help