GuiGridListSetSelectedItem: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool guiGridListSetSelectedItem ( element gridList, int rowIndex, int columnIndex )
bool guiGridListSetSelectedItem ( element gridList, int rowIndex, int columnIndex [, bool bReset = true ] )
</syntaxhighlight>  
</syntaxhighlight>  


Line 12: Line 12:
*'''rowIndex:''' the row you want to select (index 0 is the first row)
*'''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)
*'''columnIndex:''' the column you want to select (index 1 is the first column)
{{New feature|3.0111|1.1.1|
==Optional Arguments==
{{OptionalArg}}
*'''bReset:'''
}}


===Returns===
===Returns===

Revision as of 15:43, 12 September 2011

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 might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • bReset:

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

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows