GuiGridListGetColumnTitle

From Multi Theft Auto: Wiki

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

Syntax

string guiGridListGetColumnTitle( element guiGridlist, int columnIndex )

OOP Syntax Help! I don't understand this!

Method: GuiGridList:getColumnTitle(...)

Required Arguments

  • guiGridlist: The grid list you want to get the column title from
  • columnIndex: Column ID

Returns

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

Requirements

Minimum supported server n/a
Minimum supported client 1.3.1-9.04949.0

Note: Using this function requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3.1-9.04949.0" />

Example

Click to collapse [-]
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

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