GuiGridListSetColumnTitle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Remove obsolete Requirements section)
 
(One intermediate revision by one other user 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===
Line 14: Line 15:
===Returns===
===Returns===
Returns ''true'' if the new title was set, or ''false'' otherwise.
Returns ''true'' if the new title was set, or ''false'' otherwise.
==Requirements==
{{Requirements|n/a|1.3.1-9.04949.0}}


==Example==
==Example==

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

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI