Jump to content

[GUI]GridList


Hero192

Recommended Posts

Hey guys, i want to get a number for each gridlist created and this number shows in the gridlist

at the Column: "ID"

i used the function guiGridListGetRowCount but i don't know how to use it in this situation.. please give me a hand

local client = getLocalPlayer() 
window = guiCreateWindow(487,214,398,270,"Spawner",false) 
guiWindowSetSizable(window,false) 
guiSetVisible(window,false) 
grid = guiCreateGridList(9,21,380,212,false,window) 
guiGridListAddColumn(grid,"ID:",0.9) 
yes = guiCreateButton(28,238,148,23,"Spawn",false,window) 
no = guiCreateButton(224,238,148,23,"Close",false,window) 
  
addEvent("gui",true) 
addEventHandler("gui",root, 
function (Table) 
theMarker = marker 
guiSetVisible(window,true) 
showCursor(true) 
guiGridListClear(grid) 
for i,v in pairs(Table) do 
local row = guiGridListAddRow(grid) 
local  
guiGridListSetItemText(grid, row, 1, guiGridListGetRowCount(v), false, false) 
guiGridListSetItemText(grid, row, 2, getVehicleNameFromModel(v), false, false) 
   end 
end) 

Link to comment
local client = getLocalPlayer() 
window = guiCreateWindow(487,214,398,270,"Spawner",false) 
guiWindowSetSizable(window,false) 
guiSetVisible(window,false) 
grid = guiCreateGridList(9,21,380,212,false,window) 
guiGridListAddColumn(grid,"ID:",0.9) 
yes = guiCreateButton(28,238,148,23,"Spawn",false,window) 
no = guiCreateButton(224,238,148,23,"Close",false,window) 
  
addEvent("gui",true) 
addEventHandler("gui",root, 
function (Table) 
theMarker = marker 
guiSetVisible(window,true) 
showCursor(true) 
guiGridListClear(grid) 
for i,v in pairs(Table) do 
local row = guiGridListAddRow(grid) 
guiGridListSetItemText(grid, row, 1, i, false, false) 
guiGridListSetItemText(grid, row, 2, getVehicleNameFromModel(v), false, false) 
   end 
end) 

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...