..:D&G:.. Posted June 26, 2015 Posted June 26, 2015 Hello guys, I am trying to add rows with info in a gridlist from a table, but I don't really know how to do it... local items = { {"Infernus", 2}, } donItemsList = guiCreateGridList(24, 98, 257, 351, false, mainWindow) donBItemName = guiGridListAddColumn(donItemsList, "Item Name", 0.9) guiGridListAddRow(donItemsList) guiGridListSetItemText(donItemsList, 0, 1, "Item 1", false, false) The "2" means that the "Infernus" item will be on the second tab from the gridlist. Thanks. MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
Tomas Posted June 26, 2015 Posted June 26, 2015 local items = { {"Infernus", 2}, } donItemsList = guiCreateGridList(24, 98, 257, 351, false, mainWindow) donBItemName = guiGridListAddColumn(donItemsList, "Item Name", 0.9) for index, value in ipairs (items) do guiGridListAddRow(donItemsList) guiGridListSetItemText(donItemsList, index, value[2], value[1], false, false) end Currently developing for International Gaming Community - Join us!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now