# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
set the width of object to numberOfPixels
# Examples
set the width of the target to 100
set the width of button 1 to the formattedWidth of button 1
# Description
Use the width property to determine how much horizontal space an object needs, or to make it wider or narrower.
The width of a card is always the same as the width of its stack window. You can set the width of a card, but doing so has no effect and doesn't change the card width property.
If you reduce the width of a stack, some objects may end up outside the stack window. These objects are not shown; however, they are still there, and will be displayed if you make the window wide enough.
If the object's lockLocation property is false, when you change its width, it shrinks or grows from the center: the object left and right edges both shift, while the object's location property stays the same. If the object lockLocation property is true, it shrinks or grows from the top left corner: the object left edge stays in the same place, and the right edge moves.
>*Cross-platform note:* On Mac OS and OS X, the > maximum width of an image is 16384 divided by the screen's > bit depth. (For example, if the number of colors is "Millions", the > maximum image width is 4096 pixels.)
>*Note:* The current architecture uses 16-bit signed integers for all > co-ordinates, which means that the value range is -32768 to 32767.
# Tags
ui,
# See
- **keyword:** card, image - **property:** backSize, left, titleWidth, orientation, tabStops, pixels, lockLocation, location, hScrollbar, maxWidth - **command:** revChangeWindowSize - **object:** stack, card - **glossary:** object, property, bit depth, Mac OS, stack window, OS X