GuiLabelSetHorizontalAlign: Difference between revisions
Jump to navigation
Jump to search
(New page: {{Client function}} __NOTOC__ This function sets the horizontal alignment of a text label. ==Syntax== <syntaxhighlight lang="lua"> number guiLabelSetHorizontalAlign ( element theLabel, int align ) </co...) |
m (Added OOP Method + Variable Information) |
||
(9 intermediate revisions by 8 users not shown) | |||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool guiLabelSetHorizontalAlign ( element theLabel, string align, [ bool wordwrap = false ] ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Element/GUI/Text label|GuiLabel]]:setHorizontalAlign|horizontalAlign}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theLabel:''' The text label to set the horizontal alignment on. | *'''theLabel:''' The text label to set the horizontal alignment on. | ||
*'''align:''' The alignment type. Valid | *'''align:''' The alignment type. Valid type strings are: | ||
** | **"left" | ||
** | **"center" | ||
** | **"right" | ||
* | *'''wordwrap:''' Whether or not to enable wordwrap for the gui-label. | ||
===Returns=== | ===Returns=== | ||
Line 23: | 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 11:47, 7 August 2019
This function sets the horizontal alignment of a text label.
Syntax
bool guiLabelSetHorizontalAlign ( element theLabel, string align, [ bool wordwrap = false ] )
OOP Syntax Help! I don't understand this!
- Method: GuiLabel:setHorizontalAlign(...)
- Variable: .horizontalAlign
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 1local label = guiCreateLabel(300,200,500,50,"Text",false) guiLabelSetHorizontalAlign(label,"center")
See Also
General functions
- guiBringToFront
- getChatboxLayout
- getChatboxCharacterLimit
- guiCreateFont
- guiBlur
- guiFocus
- guiGetAlpha
- guiGetCursorType
- guiGetEnabled
- guiGetFont
- guiGetInputEnabled
- guiGetInputMode
- guiGetPosition
- guiGetProperties
- guiGetProperty
- guiGetScreenSize
- guiGetSize
- guiGetText
- guiGetVisible
- guiMoveToBack
- guiSetAlpha
- guiSetEnabled
- guiSetFont
- guiSetInputEnabled
- guiSetInputMode
- guiSetPosition
- guiSetProperty
- guiSetSize
- guiSetText
- guiSetVisible
- isChatBoxInputActive
- isConsoleActive
- isDebugViewActive
- isMainMenuActive
- isMTAWindowActive
- isTransferBoxActive
- setChatboxCharacterLimit
- setDebugViewActive
Browsers
Buttons
Checkboxes
Comboboxes
- guiCreateComboBox
- guiComboBoxAddItem
- guiComboBoxClear
- guiComboBoxGetItemCount
- guiComboBoxGetItemText
- guiComboBoxGetSelected
- guiComboBoxIsOpen
- guiComboBoxRemoveItem
- guiComboBoxSetItemText
- guiComboBoxSetOpen
- guiComboBoxSetSelected
Edit Boxes
- guiCreateEdit
- guiEditGetCaretIndex
- guiEditGetMaxLength
- guiEditIsMasked
- guiEditIsReadOnly
- guiEditSetCaretIndex
- guiEditSetMasked
- guiEditSetMaxLength
- guiEditSetReadOnly
Gridlists
- guiCreateGridList
- guiGridListAddColumn
- guiGridListAddRow
- guiGridListAutoSizeColumn
- guiGridListClear
- guiGridListGetColumnCount
- guiGridListGetColumnTitle
- guiGridListGetColumnWidth
- guiGridListGetHorizontalScrollPosition
- guiGridListGetItemColor
- guiGridListGetItemData
- guiGridListGetItemText
- guiGridListGetRowCount
- guiGridListGetSelectedCount
- guiGridListGetSelectedItem
- guiGridListGetSelectedItems
- guiGridListGetSelectionMode
- guiGridListIsSortingEnabled
- guiGridListGetVerticalScrollPosition
- guiGridListInsertRowAfter
- guiGridListRemoveColumn
- guiGridListRemoveRow
- guiGridListSetColumnTitle
- guiGridListSetColumnWidth
- guiGridListSetHorizontalScrollPosition
- guiGridListSetItemColor
- guiGridListSetItemData
- guiGridListSetItemText
- guiGridListSetScrollBars
- guiGridListSetSelectedItem
- guiGridListSetSelectionMode
- guiGridListSetSortingEnabled
- guiGridListSetVerticalScrollPosition
Memos
- guiCreateMemo
- guiMemoGetCaretIndex
- guiMemoGetVerticalScrollPosition
- guiMemoSetVerticalScrollPosition
- guiMemoIsReadOnly
- guiMemoSetCaretIndex
- guiMemoSetReadOnly
Progressbars
Radio Buttons
Scrollbars
Scrollpanes
- guiCreateScrollPane
- guiScrollPaneGetHorizontalScrollPosition
- guiScrollPaneGetVerticalScrollPosition
- guiScrollPaneSetHorizontalScrollPosition
- guiScrollPaneSetScrollBars
- guiScrollPaneSetVerticalScrollPosition
Static Images
Tab Panels
Tabs
Text Labels
- guiCreateLabel
- guiLabelGetColor
- guiLabelGetFontHeight
- guiLabelGetTextExtent
- guiLabelSetColor
- guiLabelSetHorizontalAlign
- guiLabelSetVerticalAlign
Windows
Input
GUI
- onClientGUIAccepted
- onClientGUIBlur
- onClientGUIChanged
- onClientGUIClick
- onClientGUIComboBoxAccepted
- onClientGUIDoubleClick
- onClientGUIFocus
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUIScroll
- onClientGUISize
- onClientGUITabSwitched
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel