JavaScript Editor js editor     Web development 

Main Page

Specifies the width of an object. Available at design time and run time.

 [Object.]Width[ = nWidth]

Return Value


Specifies the width of an object.


Applies To: CheckBox | Column | ComboBox | CommandButton | CommandGroup | Container Object | Control Object | Custom | EditBox | Form | Grid | Image | Label | Line | ListBox | OLE Bound Control | OLE Container Control | OptionButton | OptionGroup | PageFrame | _SCREEN | Shape | Spinner | TextBox | Timer | ToolBar

Use the Height, Width, Left, and Top properties for operations or calculations based on an object's total area, such as sizing or moving the object.

For forms and controls, the values for this property changes as the object is sized by the user or in code. Maximum settings of this property for all objects are system-dependent.

For forms, the Width property specifies the external width of the form, excluding the borders. If the ScrollBars property is set to enable scroll bars, Width does not include space taken up by the scroll bar when it appears. . In Visual FoxPro, the maximum width of a form has been increased to approximately 32,000 pixels.

For controls, the Width property is measured from the center of the control's border so that controls with different border widths align correctly.

The Width property is read-only when it applies to a control contained in a Column object.

The Width property is determined in the unit of measurement specified by the ScaleMode property setting.

See Also

JavaScript Editor js editor     Web development