AddLabel - cWebSlider
Adds a label to a slider
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| iValue | Integer | Slider value the label should be placed at |
| sLabel | String | Label caption |
Syntax
Procedure AddLabel Integer iValue String sLabel
Call Example
Send AddLabel iValue sLabel
Description
AddLabel adds a label to a slider. Add labels inside the OnFillLabels event.
Sample
Object oDemoSliders is a cWebView
Object oCustomer_DD is a Customer_DataDictionary
End_Object
Set Main_DD to oCustomer_DD
Set Server to oCustomer_DD
Object oCreditLimit is a cWebSlider
Entry_Item Customer.Credit_Limit
Set psLabel to "Credit Limit:"
Set piMinValue to 10000
Set piMaxValue to 500000
Set pbShowValue to True
Set pbShowRange to True
Procedure OnFillLabels
Send AddLabel 100000 "Low"
Send AddLabel 250000 "Medium"
Send AddLabel 400000 "High"
End_Procedure
End_Object
End_Object
The above example, a cWebSlider object (oCreditLimit) has a data binding to the Customer.Credit_Limit column. This will indicate the current record's credit limit value by the setting the position of the slider handle within the range specified by the properties piMinValue and piMaxValue.
The OnFillLabels event has been augmented to create three labels along the length of the slider bar using the AddLabel method. The labels "Low", "Medium" and "High" will be displayed at positions 100000, 250000 and 400000 on the slider bar.