PC SOFT

WINDEV的在线文档

  • Overview
  • Control in a window or in a page
  • Creating a Rating control
  • Characteristics of the Rating control
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview

Control in a window or in a page

The Rating control allows the user to:
  • indicate the popularity level of an element via repeated pictograms.
  • find out the popularity level of an element via repeated pictograms.
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 pictogram. For example, you have the ability to use images from the image catalog.
Note: To use the Rating control in Windows 2000, the GDI+ framework must be installed on the user computers.

Creating a Rating control
To create a Rating control:
  1. In the window editor or in the page editor, click(or select "Insert .. Control .. Rating control").On the "创建" pane, in the "显示控件" group, click "评级".
  2. Click the position where the control must be created in the window or in the page. The control appears in creation mode.
Tip: You also have the ability to create a "preset" Rating control by clicking the arrow found on the right of the icon. The list of available controls (with their preview in the skin template of the project) is displayed. All you have to do is click the requested control to create it in the editor.Tip: You can also create a "preset" Rating control by clicking the arrow found on the right of the "Rating" option. The list of available controls (with their preview in the skin template of the project) is displayed. All you have to do is click the requested control to create it in the editor.

To display the characteristics of the control, select "Description" from the popup menu of the control.

Characteristics of the Rating control
The "General" tab in the description window of the Rating control is used to define the characteristics of the control:
  • The maximum possible mark: is used to define the number of pictogram 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 pictograms found in the image. This option is available only if the layout of the image sheet is using 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 entered by the user.
  • The image of the marks: Image used to view the marks. If this parameter is not specified, the image of a star is used by default. This image can be found in the image catalog. In this case, the selected image is automatically adapted to the specified options.
  • Layout of image sheet: used to define the mode for dividing the image sheet of the control:
    • Same image for each mark: The image must contain a single pictogram (represented by several states). the repetition of the pictogram will be used to represent the different possible values in the control.
    • Different image for each mark: The image must contain several pictograms (each one being represented by several states). Each pictogram will be used to represent the different possible values in the control. In this mode, the maximum mark corresponds to the number of pictograms contained in the image.
  • Graphically differentiate the marks less than the current mark:
    • When this mode is disabled, the marks less than the current mark are displayed like the current mark.
    • When this mode is enabled, the marks less than the current mark are drawn by using the status 0 of the image sheet (the marks less than the current mark will be invisible if the image contains a single status).