DgsGridListSetItemSelectable

From Multi Theft Auto: Wiki

This function sets whether the item is selectable, which has a lower priority than dgsGridListSetRowSelectable.

Syntax

bool dgsGridListSetItemSelectable( element gridlist, int row, int column, boolean state )

Required Arguments

  • gridlist: The dgs grid list you want to set.
  • row: The row index of the grid list.
  • column: The column index of the grid list.
  • state: Whether the row of grid list is selectable.

Returns

Returns true if successful, false otherwise

Example

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:dgsGridListSetItemSelectable(playerList, row, column, false)
end

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Selector

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

QRCode

Remote Image

Rounded Rectangle