..:D&G:.. Posted June 26, 2015 Share 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. Link to comment
Tomas Posted June 26, 2015 Share 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 Link to comment
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