DgsGridListSetRowSelectable: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Blanked the page)
Tag: Blanking
Line 1: Line 1:
{{Client function}}
__NOTOC__
This function sets whether the row is selectable.


==Syntax==
<syntaxhighlight lang="lua">
bool dgsGridListSetRowSelectable( element gridlist, int row, boolean state )
</syntaxhighlight>
===Required Arguments===
*'''gridlist:''' The dgs grid list you want to set.
*'''row:''' The row index of the grid list.
*'''state:''' Whether the row of grid list is selectable ().
===Returns===
Returns true if succeed, false otherwise
==Example==
<syntaxhighlight lang="lua">
DGS = exports.dgs
local playerList = DGS:dgsCreateGridList (346, 163, 433, 403, false )  --Create the grid list element
local column = DGS:dgsGridListAddColumn( playerList, "Player", 0.5 )  --Create a players column in the list
for id, player in ipairs(getElementsByType("player")) do
local row = DGS:dgsGridListAddRow ( playerList )
    DGS:dgsGridListSetItemText ( playerList, row, column, getPlayerName ( player ) )
    DGS:dgsGridListSetRowSelectable(playerList, row, false)
end
</syntaxhighlight>
==See Also==
{{DGSFUNCTIONS}}

Revision as of 12:04, 20 May 2020