Plate Posted January 1, 2013 Posted January 1, 2013 Hola alguien me podria decir como poner los teams en una gridlist porfavor
Castillo Posted January 1, 2013 Posted January 1, 2013 Tenes que usar un for-loop con getElementsByType.
Plate Posted January 1, 2013 Author 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 ):
Plate Posted January 2, 2013 Author 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
Castillo Posted January 2, 2013 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.
Plate Posted January 2, 2013 Author Posted January 2, 2013 (edited) Gracias solid Pero cuando creo un team no aparece en la lista Edited January 2, 2013 by Guest
Recommended Posts