Jump to content

usar flechas en gridlist


Recommended Posts

Posted

Buenas, queria saber como puedo usar las flechas en un listado.

Por ejemplo, tengo un listado de usuarios, y quiero que al apretar la flecha valla cambiando al sigente jugador y asi.

Pero no he podido ver como hacerlo

muchas gracias

Posted

Es gridlist? Si es gridlist:

guiGridListGetSelectedItem 
guiGridListSetSelectedItem 
bindKey 

Ejemplo ( No testeado ):

function nextSelected(key) 
    local row, column = guiGridListGetSelectedItem( theGridList ) 
    if key == "arrow_u" then 
        guiGridListSetSelectedItem ( theGridList, row+1, column ) 
    elseif key == "arrow_d" then 
        guiGridListSetSelectedItem ( theGridList, row-1, column ) 
    end 
end 
bindKey("arrow_d", "down", nextSelected) 
bindKey("arrow_u", "down", nextSelected) 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...