guiGridListSetSelectedItem | Multi Theft Auto: Wiki Skip to content

guiGridListSetSelectedItem

Client-side
Server-side
Shared

Pair: guiGridListGetSelectedItem

This function selects an item from a gridlist. If you wish to deselect whatever item is selected, pass 0 as both the rowIndex and columnIndex arguments.

OOP Syntax Help! I don't understand this!

Syntax

bool guiGridListSetSelectedItem ( ​gui-gridlist gridList, ​int rowIndex, ​int columnIndex, [ ​bool bReset = true ] )
Required arguments
  • gridList: The grid list you want to select an item in.
  • rowIndex: The row you want to select. Indexes start at 0.
  • columnIndex: The column you want to select. Indexes start at 1.
Optional arguments

Note: when using optional arguments, you might need to supply all arguments before the one you wish to use.

  • bReset (default: true): Set to false for multiple selections.

Returns

Returns true if the passed arguments are correct and the item has been selected, false otherwise.

  • bool: result

Code Examples

Script Example Missing

Function guiGridListSetSelectedItem needs a script example. Help out by writing one.

Contribution guidelines

See Also

GUI Functions