GetProperty Method for a Control
The GetProperty method returns a string that contains the value of a property. If the property does not exist, then this method returns NULL.
Format
controlVar.GetProperty(propName)
No arguments are available.
Usage
You can use the GetProperty method with the following controls:
- 
     CheckBox 
- 
     ComboBox 
- 
     TextBox 
- 
     TextArea 
- 
     Label 
You can use the GetProperty method to get values for the following properties:
- 
     Background Color 
- 
     Enabled 
- 
     FontType 
- 
     FontColor 
- 
     FontSize 
- 
     FontStyle 
- 
     Height 
- 
     Width 
- 
     Read Only 
- 
     Visible 
For more information about these properties, see Properties to Set for a Label in SetLabelProperty Method for a Control.
To return more than one property, you must use a separate statement for each property.
Used With
Browser Script
Examples
The following example uses the GetProperty method to return values for the FontSize, Background Color, Width, and Height properties:
theApplication().SWEAlert("checkbox.FontSize : " + 
objCheckBox.GetProperty("FontSize"));
theApplication().SWEAlert("checkbox.BgColor : " + 
objCheckBox.GetProperty("BgColor"));
theApplication().SWEAlert("checkbox.Width : " + objCheckBox.GetProperty("Width"));
theApplication().SWEAlert("checkbox.Height : " + 
objCheckBox.GetProperty("Height"));