GuiGridListGetColumnTitle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 23: Line 23:
theList = guiCreateGridList(0.80, 0.10, 0.15, 0.60, true) -- Create the grid list
theList = guiCreateGridList(0.80, 0.10, 0.15, 0.60, true) -- Create the grid list
column = guiGridListAddColumn(theList, "New column", 0.9) -- Create a new column in the grid list
column = guiGridListAddColumn(theList, "New column", 0.9) -- Create a new column in the grid list
local ColumnTitle = guiGridListGetColumnTitle(theList, 1)
local ColumnTitle = guiGridListGetColumnTitle(theList, 1)
outputChatBox("The Column Title Is: "..ColumnTitle, 0, 255, 0)--Get The column title in the chat
outputChatBox("The Column Title Is: "..ColumnTitle, 0, 255, 0)--Get The column title in the chat

Revision as of 11:12, 26 March 2016

Accessories-text-editor.png Script Example Missing Function GuiGridListGetColumnTitle needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

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

Syntax

string guiGridListGetColumnTitle( element guiGridlist, int columnIndex )

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

This template will be deleted.

Example

function GetColumnTitle()
theList = guiCreateGridList(0.80, 0.10, 0.15, 0.60, true) -- Create the grid list
column = guiGridListAddColumn(theList, "New column", 0.9) -- Create a new column in the grid list
local ColumnTitle = guiGridListGetColumnTitle(theList, 1)
outputChatBox("The Column Title Is: "..ColumnTitle, 0, 255, 0)--Get The column title in the chat
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