API:LabelSetWordWrap
From RoR Wiki
UI Lua API · Label functions
Version: WAR 1.4.8
Turns word wrapping on or off for a Label.
LabelSetWordWrap(labelName, wordWrap)
Arguments
- labelName
string– Name of a Label window.- wordWrap
boolean–trueto turn word wrapping on,falseto turn it off.
Returns
Nothing.
Details
wordWrapmust be a real boolean. Passingnilor a number raises an Invalid Parameters error.- If the flag already has the requested value, nothing happens. Otherwise the label's text is laid out again.
- The function needs at least two arguments and only reads the last two.
- The stock UI never calls
LabelSetWordWrap.
Errors
Error in function call 'LabelSetWordWrap': Window %s does not existError in function call 'LabelSetWordWrap': Window %s is not a Label
Example
A minimal example built from the signature above:
LabelSetWordWrap( "MyLabel", true ) LabelSetText( "MyLabel", L"A long line of text that should wrap inside the label." )
