FormControl.widthValue Method

Gets or sets the width of the control.

Syntax

public int widthValue([int value])

Run On

Client

Parameters

  • value
    Type: int
    An integer value that specifies the width in pixels; optional.

Return Value

Type: int
The width of the control in pixels.

Remarks

To change the width of the control, use the Exact width calculation mode.

Examples

The following example shows how to return and set the width value of a form control.

int nWidthValue; 
 
// The ctrl variable was previously assigned 
// as a form control value. 
 
// Retrieve the width value. 
nWidthValue = ctrl.widthValue(); 
 
// Set the width value. 
ctrl.widthMode(-1); 
ctrl.widthValue(160);

See Also

FormControl Class

FormControl.widthMode Method

FormControl.width Method