GuiGridListSetColumnTitle: Difference between revisions
Jump to navigation
Jump to search
UniOnDennis (talk | contribs) (Created page with "{{client function}} This function is used to change the column title of a gridlist column. ==Syntax== <syntaxhighlight lang="lua"> bool guiGridListSetColumnTitle( element guiGridlist, int colu...") |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 6: | Line 6: | ||
bool guiGridListSetColumnTitle( element guiGridlist, int columnIndex, string title ) | bool guiGridListSetColumnTitle( element guiGridlist, int columnIndex, string title ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Element/GUI/Gridlist|GuiGridList]]:setColumnTitle}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''guiGridlist''': The grid list you want to change the column title from | *'''guiGridlist''': The grid list you want to change the column title from | ||
*'''columnIndex''': | *'''columnIndex''': Column ID | ||
*'''title''': The title of the column | *'''title''': The title of the column | ||
Line 17: | Line 18: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local gridlist = guiCreateGridList ( 332, 195, 286, 249, false ) | |||
</syntaxhighlight> | local column = guiGridListAddColumn(gridlist, "title", 0.5) | ||
addCommandHandler("setTitle", | |||
function(cmd, title) | |||
if title then | |||
if column then | |||
guiGridListSetColumnTitle(gridlist ,column, title) | |||
outputChatBox("Column name has been successfully changed to : "..title,0,255,0) | |||
end | |||
else | |||
outputChatBox("[Usage] /setTitle [title]",255,0,0) | |||
end | |||
end | |||
)</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{GUI_functions}} | {{GUI_functions}} | ||
{{GUI_events}} |
Latest revision as of 17:09, 7 November 2024
This function is used to change the column title of a gridlist column.
Syntax
bool guiGridListSetColumnTitle( element guiGridlist, int columnIndex, string title )
OOP Syntax Help! I don't understand this!
- Method: GuiGridList:setColumnTitle(...)
Required Arguments
- guiGridlist: The grid list you want to change the column title from
- columnIndex: Column ID
- title: The title of the column
Returns
Returns true if the new title was set, or false otherwise.
Example
local gridlist = guiCreateGridList ( 332, 195, 286, 249, false ) local column = guiGridListAddColumn(gridlist, "title", 0.5) addCommandHandler("setTitle", function(cmd, title) if title then if column then guiGridListSetColumnTitle(gridlist ,column, title) outputChatBox("Column name has been successfully changed to : "..title,0,255,0) end else outputChatBox("[Usage] /setTitle [title]",255,0,0) end end )
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