Siebel Object Interfaces Reference > Interfaces Reference > Control Methods >

SetLabelProperty Method


The SetLabelProperty method sets visual properties of a label.

Syntax

controlVar.SetLabelProperty(propName, propValue)

Argument
Description

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.

Table 35 lists the properties that can be set for a label, and the values that can be assigned to them:

Table 35. Label Properties
Property
Value
Description

BgColor

string

Determines background color for a label; for example, red is "#ff0000", green is "#00ff00", and blue is "#0000ff"

FontColor

string

Determines font color for a label; for example, green is "#00ff00"

FontType

string

Determines font type for a label; for example, "Times Roman"

FontSize

string

Determines font size for a label; for example, "12 pt"

FontStyle

string

Determines font style for a label; for example, "italic"

FontWeight

string

Determines font weight 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){

switch (name) {

// Example of changing the font size of the Location label
case ("fontsize"):
{

var ctl = this.FindControl("Location");
var fSize = prompt("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
case ("bgcolor"):
{

var ctl = this.FindControl("Location");
var bgColor = prompt("Specify th ebackground color of the label. Enter a valid six hexadecimal digit RGB value preceded by #");
ctl.SetLabelProperty("BgColor", bgColor);
return ("CancelOperation");

}

// Example of changing the font type of the Location label
case ("fonttype"):
{

var ctl = this.FindControl("Location");
var fontType =prompt("Specify the font type for the label.");
ctl.SetLabelProperty("FontType", fontType);
return ("CancelOperation");

}

// Example of changing the font color of the Location label
case ("fontcolor"):
{

var ctl = this.FindControl("Location");
var fontColor = prompt("Specify the font color of the label. Enter a valid six hexadecimal digit RGB value preceded by #");
ctl.SetLabelProperty("FontColor", fontColor);
return ("CancelOperation");

}

break;

}

}

Siebel Object Interfaces Reference Copyright © 2008, Oracle. All rights reserved.