GuiGridListSetSelectedItem

From Multi Theft Auto: Wiki

Jump to: navigation, search

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.

Syntax

bool guiGridListSetSelectedItem ( element gridList, int rowIndex, int columnIndex [, bool bReset = true ] )

Required Arguments

  • gridList: the grid list you want to select an item from
  • rowIndex: the row you want to select (index 0 is the first row)
  • columnIndex: the column you want to select (index 1 is the first column)

Optional Arguments

NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.

  • bReset: set to false for multiple selections

Returns

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

Example

guiGridListSetSelectedItem ( spawnScreenGridList, 0, 0) -- resets selection to zero

See Also

Buttons

Checkboxes

Comboboxes

Edit fields


Gridlists

Memos


Progress bars

Radio buttons

Scrollbars

Scroll panes

Static images

Tab panels

Tabs

Text labels

Windows