Difference between revisions of "GuiLabelSetHorizontalAlign"

From Multi Theft Auto: Wiki
Jump to: navigation, search
m (corrected return type)
m (See Also)
 
(4 intermediate revisions by 4 users not shown)
Line 14: Line 14:
 
**"center"
 
**"center"
 
**"right"
 
**"right"
*'''wordwrap:''' Wordwrap...
+
*'''wordwrap:''' Whether or not to enable wordwrap for the gui-label.
  
 
===Returns===
 
===Returns===
Line 20: Line 20:
  
 
==Example==  
 
==Example==  
 
+
<section name="Example 1" class="client" show="true"><syntaxhighlight lang="lua">local label = guiCreateLabel(300,200,500,50,"Text",false)
 +
guiLabelSetHorizontalAlign(label,"center")</syntaxhighlight></section>
 
==See Also==
 
==See Also==
 
{{GUI functions}}
 
{{GUI functions}}
 +
{{GUI_events}}

Latest revision as of 14:23, 20 May 2018

This function sets the horizontal alignment of a text label.

Syntax

bool guiLabelSetHorizontalAlign ( element 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"
    • "right"
  • wordwrap: Whether or not to enable wordwrap for the gui-label.

Returns

Returns true on success, false otherwise.

Example

Click to collapse [-]
Example 1
local label = guiCreateLabel(300,200,500,50,"Text",false)
guiLabelSetHorizontalAlign(label,"center")

See Also

General functions

FROM VERSION 1.5.6 r16361 ONWARDS

Browsers

Buttons

Checkboxes

Comboboxes

Edit Fields

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

GUI events