DgsGridListSelectItem

From Multi Theft Auto: Wiki

This function is used to select single item by state.

Syntax

int dgsGridListSelectItem ( element gridList, int column, int row, bool state  )

Required Arguments

  • gridList: the grid list you want to set the selected row index to.
  • column: the column index you want to set.
  • row: the row index you want to set.
  • state: the select state.

Returns

Returns true if succeeded, false otherwise.

Example

DGS = exports.dgs
showCursor(true)
local GridList = DGS:dgsCreateGridList ( 0.80, 0.10, 0.15, 0.60, true )
local column1 = DGS:dgsGridListAddColumn( GridList, "test1", 0.85 )
local column2 = DGS:dgsGridListAddColumn( GridList, "test2", 0.85 )
for i=1,10 do
	local row = DGS:dgsGridListAddRow ( GridList )
	DGS:dgsGridListSetItemText ( GridList, row, column1, tostring(i) )
	DGS:dgsGridListSetItemText ( GridList, row, column2, tostring(10-i) )
end
DGS:dgsGridListSelectItem( GridList, 1, 2, true )

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D

Nine Slice

Object Preview

QRCode

mask