:: Home >>

setSize

Sets element size.

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

13 Oct 07
AW Grid size Russell Belding (2)
20 Oct 06
Important! setSize method using porcentage Lucas Moretto (1)
27 Feb 06
API method for grid width/height Mario (3)

Comments will appear on this page and in the main forum.

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