Jump to content

Clicking gridlist item


Recommended Posts

local myGridList = guiCreateGridList( ... ) 
addEventHandler( "onClientGUIClick", myGridList, function( btn ) 
  if btn ~= 'left' then return false end 
  local row, col = guiGridListGetSelectedItem( source ) 
  --check if we actually clicked on some row 
  if row >= 0 and col >= 0 then 
    --do stuff here 
  end 
end, false ) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...