TextLayout.setWidth

Sets the line width of the receiver, which determines how text should be wrapped and aligned. The default value is <code>-1</code> which means wrapping is disabled.

@param width the new width

@exception IllegalArgumentException <ul> <li>ERROR_INVALID_ARGUMENT - if the width is <code>0</code> or less than <code>-1</code></li> </ul> @exception SWTException <ul> <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> </ul>

@see #setAlignment(int)

class TextLayout
void
setWidth
(
int width
)

Meta