PC SOFT

WINDEV的在线文档

  • Overview
  • Retrieving the characteristics of the Range Slider control
  • Characteristics that can be retrieved by programming
  • Value of the Range Slider control
  • Finding out the bounds of the Range Slider control
  • Finding out the total range and the visible range of the Range Slider control
  • Modifying the value of the Range Slider control
  • Properties specific to the management of a Range Slider control
  • Example of code for using a Range Slider control to zoom on an image
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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
WinDev allows you to handle a Range Slider control by programming. To do so, use the variable of the Range Slider control in the code.

The variable of the Range Slider control:

  • corresponds to the name of the Range Slider control.
  • is initialized with the value of the Range Slider control.

Retrieving the characteristics of the Range Slider control

Characteristics that can be retrieved by programming

The characteristics that can be retrieved by programming are as follows:

Value of the Range Slider control

The value of the Range Slider control corresponds to:
  • the position of the left extremity of the box of an horizontal Range Slider control.
  • the position of the top extremity of the box of a vertical Range Slider control.
To retrieve the value of the Range Slider control, use the following syntax:

<Position> = <Name of Range Slider>

<Position> is an integer variable.

Note: You also have the ability to use ..值.

Finding out the bounds of the Range Slider control

..最大界限 and ..最小界限 are used to find out the upper and lower bounds of the Range Slider control.

The lower bound corresponds to the value of the extremity of the Range Slider control:

  • left extremity for an horizontal Range Slider control
  • top extremity for a vertical Range Slider control.
The upper bound corresponds to the maximum value that can be taken by the Range Slider control with the current configuration of the box of the Range Slider control.

Example:

Bounds of the Range Slider control

In this example, in position 1:

  • the value of the Range Slider control is 21.
  • the lower bound is 1.
  • the upper bound is 40. This upper bound corresponds to the value of the Range Slider control when the box of the Range Slider control is positioned at the maximum extremity. This case corresponds to position 2. This bound corresponds to the following calculation: Lower bound + (Total range - Visible range).

Finding out the total range and the visible range of the Range Slider control

..总范围 and ..可见范围 are used to find out the total range and the visible range of the Range Slider control.

Modifying the value of the Range Slider control
To modify the value of the Range Slider control, use the following syntax:

<Name of Range Slider> = <Value>

<Value> is a value included between the minimum value and the maximum value of the Range Slider control. These values have been described in the description window of the control or by programming, with ..最小界限 and ..最大界限 (the upper bound depending on the visible range and on the total range).

For example, for a Range Slider control with the following charateristics:

  • LowerBound = 1
  • TotalRange = 5
  • VisibleRange = 2
The upper bound will be 4 (1 + 5 -2)

The possible values will be 1, 2, 3 and 4

Note: You also have the ability to use ..值 to modify the value of the Range Slider control.

Properties specific to the management of a Range Slider control
The following properties are used to manage the characteristics of a Range Slider control by programming.
进度步长Used to find out and modify the value of the scroll step for a Range Slider control.
快进Used to find out and modify the value of the increment step for a Range Slider control.
最大界限Allows you to find out and modify the upper bound of a Range Slider control.
最小界限Allows you to find out and modify the lower bound of a Range Slider control.
15版本和更高版本
总范围
15新版本
总范围
总范围
Used to find out and modify the total number of data represented by the Range Slider control.
15版本和更高版本
可见范围
15新版本
可见范围
可见范围
Used to find out and modify the width of the scrollbar box in a Range Slider control.

To find out the entire list of WLanguage properties that can be used with a Range Slider control, see Properties associated with the Range Slider control.

Example of code for using a Range Slider control to zoom on an image
The following code is called whenever a Range Slider control is modified and it used to perform a zoom on an image area defined by the visible range of the Range Slider control.

过程DisplayImage()

// Copy the area corresponding to the zoom bar of the two Range Slider controls
// (1 horizontal and 1 vertical) in the entire destination Image control
绘图复制图片IMG_SOURCEIMG_DESTINATION绘图复制.简单复制图片,... // "Direct" copy
// Lower bound of Range Slider
RGS_HORIZONTAL..值,RGS_VERTICAL..值,...
// The entire width of the zoom area
RGS_VERTICAL..可见范围,RGS_HORIZONTAL..可见范围,...
// Copy into the destination control at the top left
11,...
// Copy into the destination control on the entire surface
IMG_DESTINATION..高度,IMG_DESTINATION..宽度)