guiLabelSetHorizontalAlign | Multi Theft Auto: Wiki Skip to content

guiLabelSetHorizontalAlign

Client-side
Server-side
Shared

This function sets the horizontal alignment of a text label.

OOP Syntax Help! I don't understand this!

  • Method:gui-label:setHorizontalAlign(...)
  • Variable: .horizontalAlign

Syntax

bool guiLabelSetHorizontalAlign ( ​gui-label theLabel, ​string align, [ ​bool wordwrap = false ] )
Required arguments
  • theLabel: The text label to set the horizontal alignment on.
  • align: The alignment type. Valid type strings are left, center or right.
Optional arguments

Note: when using optional arguments, you might need to supply all arguments before the one you wish to use.

  • wordwrap (default: false): Whether or not to enable wordwrap for the gui-label.

Returns

Returns true on success, false otherwise.

  • bool: result

Code Examples

client
local label = guiCreateLabel(300,200,500,50,"Text",false)
guiLabelSetHorizontalAlign(label,"center")

See Also

GUI Functions