SetProperty Method for a Control
The SetProperty method sets the properties of a control. This method does not return any information.
Format
controlVar.SetProperty(propName, propValue)
The following table describes the arguments for the SetProperty method.
Argument | Description |
---|---|
propName |
The name of the property that Siebel CRM must set. The values you can enter are described later in this topic. |
propValue |
The value that Siebel CRM must set for the property. The values that you can enter are described later in this topic. |
Usage
You can use the SetProperty method with the following controls:
-
CheckBox
-
ComboBox
-
TextBox
-
TextArea
If you must set more than one property, then you must use a separate statement to set each property.
Properties to Set for a Control
The following table describes the properties you can set for a control.
Property | Value | Description |
---|---|---|
Enabled |
TRUE or FALSE |
Determines if the control is active. The default value is the value in the Siebel runtime repository. |
Shown |
TRUE or FALSE |
Determines if Siebel CRM displays the control. The default value is the value in the Siebel runtime repository. |
ReadOnly |
TRUE or FALSE |
Determines if the control is read-only. The default value is the value in the Siebel runtime repository. |
BgColor FontColor FontType FontSize FontStyle FontWeight Height Visible Width |
N/A |
To modify these control properties, you can use these same properties you use to modify a label. For a description of the values you can enter, see Properties You Can Set For a Label in SetLabelProperty Method for a Control. |
Used With
Browser Script
Using the SetProperty Method to Control Font Weight
To use the SetProperty method to control font weight, you must use the FontWeight property. For example:
control.SetProperty("FontWeight","600")
You cannot use the FontStyle argument to control font weight. For example, the following code fails:
control.SetProperty("FontStyle", "Bold")
Examples
The following code uses the SetProperty method:
objCheckBox.SetProperty("FontColor", "#00ff00");
objCheckBox.SetProperty("FontStyle", "italic");
objCheckBox.SetProperty("FontType", "Verdana");
objCheckBox.SetProperty("FontSize", "14 pt");
objCheckBox.SetProperty("BgColor", "#00f000");
objCheckBox.SetProperty("Width", "100");
objCheckBox.SetProperty("Height", "100");