:: Documentation >>

setSize

Sets element size.

null

Syntax

obj.setSize(width, height);

Parameters

width (number) - element width in pixels
height (number) - element height in pixels

Example

obj.setSize(300, 200);

Remarks

The parameters for this method should be numeric values which are interpreted as pixels. This method does not allow using % or em values. For other units just call setStyle() method directly.

In 'standards-compliant' mode this method adjusts for control padding - 8px width and 4px height.

See also

setPosition() method

Comments

AW Grid size Russell Belding (2)
Important! setSize method using porcentage Lucas Moretto (1)
API method for grid width/height Mario (3)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5