Plate Posted January 1, 2013 Share Posted January 1, 2013 Hola alguien me podria decir como poner los teams en una gridlist porfavor Link to comment
Castillo Posted January 1, 2013 Share Posted January 1, 2013 Tenes que usar un for-loop con getElementsByType. Link to comment
Plate Posted January 1, 2013 Author Share Posted January 1, 2013 local teams = getElementsByType("team") for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end no me anda ): Link to comment
Plate Posted January 2, 2013 Author Share Posted January 2, 2013 teamList = guiCreateGridList(518,47,265,259,false,apanel) column = guiGridListAddColumn(teamList,"Teams",0.2) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, column, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, column, getTeamColor ( team ) ) end Link to comment
Castillo Posted January 2, 2013 Share Posted January 2, 2013 teamList = guiCreateGridList(518,47,265,259,false,apanel) column = guiGridListAddColumn(teamList,"Teams",0.2) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamList ) guiGridListSetItemText ( teamList, row, column, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamList, row, column, getTeamColor ( team ) ) end Habias puesto: "teamsList" no "teamList" en add row y set item text/color. Link to comment
Plate Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) Gracias solid Pero cuando creo un team no aparece en la lista Edited January 2, 2013 by Guest Link to comment
Recommended Posts