Partilhar via


FormControl.widthValue Method

Definition

Overloads

widthValue()

Gets or sets the width of the control.

widthValue(Int32)

widthValue()

Gets or sets the width of the control.

public:
 virtual int widthValue();
public virtual int widthValue ();
abstract member widthValue : unit -> int
override this.widthValue : unit -> int
Public Overridable Function widthValue () As Integer

Returns

The width of the control in pixels.

Remarks

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

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);

Applies to

widthValue(Int32)

public:
 virtual int widthValue(int _value);
public virtual int widthValue (int _value);
abstract member widthValue : int -> int
override this.widthValue : int -> int
Public Overridable Function widthValue (_value As Integer) As Integer

Parameters

_value
Int32

An integer value that specifies the width in pixels; optional.

Returns

Applies to