GuiLabelSetVerticalAlign: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: {{Client function}} __NOTOC__ This function sets the vertical alignment of a text label. ==Syntax== <syntaxhighlight lang="lua"> number guiLabelSetVerticalAlign ( element theLabel, int align ) </syntaxhighlight> ...)
 
m (Added OOP Method + Variable Information)
 
(5 intermediate revisions by 4 users not shown)
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
number guiLabelSetVerticalAlign ( element theLabel, int align )
bool guiLabelSetVerticalAlign ( element theLabel, string align )
</syntaxhighlight>  
</syntaxhighlight>  
 
{{OOP||[[Element/GUI/Text label|GuiLabel]]:setVerticalAlign|verticalAlign}}
===Required Arguments===  
===Required Arguments===  
*'''theLabel:''' The text label to set the vertical alignment on.
*'''theLabel:''' The text label to set the vertical alignment on.
*'''align:''' The alignment type. Valid types are:
*'''align:''' The alignment type. Valid type strings are:
**CGUI_ALIGN_TOP = 0,
**"top"
**CGUI_ALIGN_BOTTOM = 1,
**"center"
**CGUI_ALIGN_VERTICALCENTER = 2
**"bottom"
 


===Returns===
===Returns===
Line 20: Line 19:


==Example==  
==Example==  
 
<section name="Example 1" class="client" show="true"><syntaxhighlight lang="lua">local label = guiCreateLabel(300,200,100,500,"Text",false)
guiLabelSetVerticalAlign(label,"bottom")</syntaxhighlight></section>
==See Also==
==See Also==
{{GUI functions}}
{{GUI functions}}
{{GUI_events}}

Latest revision as of 11:48, 7 August 2019

This function sets the vertical alignment of a text label.

Syntax

bool guiLabelSetVerticalAlign ( element theLabel, string align )

OOP Syntax Help! I don't understand this!

Method: GuiLabel:setVerticalAlign(...)
Variable: .verticalAlign


Required Arguments

  • theLabel: The text label to set the vertical alignment on.
  • align: The alignment type. Valid type strings are:
    • "top"
    • "center"
    • "bottom"

Returns

Returns true on success, false otherwise.

Example

Click to collapse [-]
Example 1
local label = guiCreateLabel(300,200,100,500,"Text",false)
guiLabelSetVerticalAlign(label,"bottom")

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI