Jaa


FormTreeControl.widthMode Method

Definition

Overloads

widthMode()

Gets or sets the calculation mode for the width of the control.

widthMode(Int32)

widthMode()

Gets or sets the calculation mode for the width of the control.

public:
 override int widthMode();
public override int widthMode ();
override this.widthMode : unit -> int
Public Overrides Function widthMode () As Integer

Returns

An integer value that indicates the current width calculation mode.

Remarks

Calculate the width according to the following table.

Mode Width calculation
Exact The exact width of the control in pixels is used.
Auto The width of the control is calculated automatically, and the value parameter is ignored.
Column width The layout of the form determines the width of the control.

The width of the control might change when the calculation mode is set to Auto or Column width.

The following example shows how to return and set the width calculation mode for a form tree control.

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

Applies to

widthMode(Int32)

public:
 override int widthMode(int _value);
public override int widthMode (int _value);
override this.widthMode : int -> int
Public Overrides Function widthMode (_value As Integer) As Integer

Parameters

_value
Int32

An Integer data type value that indicates how control width is calculated. This value can be -1 for Exact mode, 0 for Auto mode, or 1 for Column width mode.

Returns

Applies to