Siebel Object Interfaces Reference > Interfaces Reference > Control Methods >
SetLabelProperty Method
The SetLabelProperty method sets visual properties of a label. Syntax
controlVar.SetLabelProperty(propName, propValue)
|
|
propName |
The name of the property to be set, as described in the following table |
propValue |
The value to assign to the property, as described in the following table |
Returns
Not applicable Usage
If more than one property is to be set, each must be set in a separate statement. The following table lists the properties that can be set for a label, and the values that can be assigned to them.
|
|
|
BgColor |
string |
Determines Background Color for a label: for example, red is "ff0000", green is "00ff00", and blue is "0000ff" |
FontColor |
string |
Determines FontColor for a label: for example, green is "00ff00" |
FontType |
string |
Determines FontType for a label: for example, "Times Roman" |
FontSize |
string |
Determines FontSize for a label: for example, "12 pt" |
FontStyle |
string |
Determines FontStyle for a label: for example, "Italic" |
FontWeight |
string |
Determines FontWeight for a label. Acceptable values are bold, bolder, lighter, normal, 100, 200, 300, 400 (equivalent to normal), 500, 600, 700 (equivalent to bold), 800, and 900. Default is normal. |
Height |
string |
Determines Height for a label, in pixels: for example, "5" |
Visible |
visible or hidden
|
Determines whether the label is visible. Defaults to repository definition unless explicitly modified by using SetLabelProperty. |
Width |
string |
Determines Width for a label, in pixels: for example, "80" |
The SetLabelProperty method is not enabled by default. You must enable it in Siebel Tools before using it in a script. To enable the SetLabelProperty, expand the Control node in the Tools Object Explorer and select the Control User Prop node. Then add a new Control User Prop named "useLabelID" with a value of "TRUE". Used With
Browser Script Example
The following code shows the use of SetLabelProperty. function Applet_PreInvokeMethod (name, inputPropSet){ // example of changing the Font Size of the Location label if (name == "fontsize") { var ctl = this.FindControl("Location"); var fSize = prompt("Please specify the desired label font size (numeric value only)."); ctl.SetLabelProperty("FontSize", fSize); return ("CancelOperation"); }
// example of changing the Background Color of the Location label else if (name == "bgcolor") { var ctl = this.FindControl("Location"); var bgColor = prompt("Specify the background color of the label. Please enter a valid six hexadecimal digit RGB value"); ctl.SetLabelProperty("BgColor", bgColor); return ("CancelOperation"); }
// example of changing the Font Type of the Location label else if (name == "fonttype") { var ctl = this.FindControl("Location"); var fontType = prompt("Please specify the font type for the label"); ctl.SetLabelProperty("FontType", fontType); return ("CancelOperation"); }
// example of changing the Font Color of the Location label else if (name == "fontcolor") { var ctl = this.FindControl("Location"); var fontColor = prompt("Specify the font color of the label. Please enter a valid six hexadecimal digit RGB value"); ctl.SetLabelProperty("FontColor", fontColor); return ("CancelOperation"); } else return ("ContinueOperation"); }
|