guiGridListGetColumnTitle | Multi Theft Auto: Wiki Skip to content

guiGridListGetColumnTitle

Client-side
Server-side
Shared

Pair: guiGridListSetColumnTitle

This function is used to get the column title of a gridlist column.

OOP Syntax Help! I don't understand this!

Syntax

string|false guiGridListGetColumnTitle ( ​gui-gridlist guiGridlist, ​int columnIndex )
Required arguments
  • guiGridlist: The grid list you want to get the column title from.
  • columnIndex: Column ID. Indexes start at 1.

Returns

Returns a string containing the column title, or false otherwise.

  • string|false: column title

Code Examples

client
local theList = guiCreateGridList(0.80, 0.10, 0.15, 0.60, true) -- Create the grid list
local column = guiGridListAddColumn(theList, "New column", 0.9) -- Create a new column in the grid list
function GetColumnTitle()
if column then
local ColumnTitle = guiGridListGetColumnTitle(theList, column)
outputChatBox("The Column Title Is: " .. ColumnTitle, 0, 255, 0) -- Get The column title in the chat
end
end
addCommandHandler("GetTitle", GetColumnTitle)

See Also

GUI Functions