Jump to content

How to move Arrows in guiGridList


Hero192

Recommended Posts

Thanks, i'll try that, please i still have one more error about this

EDIT: I tried that but doesn't working ..

-Note: "it's my first time i uses guiGridListSetVerticalScrollPosition/guiGridListGetVerticalScrollPosition

  
addEventHandler("onClientGUIClick",root, 
function () 
   if (source == reject) then 
        guiSetVisible(window, false) 
        showCursor(false) 
           unbindKey("arrow_up", "down",arr ) 
    unbindKey("arrow_down", "down",arl ) 
    elseif (source == buy) then 
    if (guiGridListGetSelectedItem (grid)) then 
    local weapID = guiGridListGetItemText ( grid, guiGridListGetSelectedItem (grid), 1 ) 
    local weapName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem (grid), 2 ) 
      local weapPrice = Weapons[guiGridListGetSelectedItem (grid)][3] 
     local row = guiGridListAddRow ( grid ) 
    guiGridListSetItemText ( grid, row, column, message, false, false ) 
    local rowCount = guiGridListGetRowCount ( grid ) 
    setTimer ( guiGridListSetVerticalScrollPosition, 50, 1, grid, 100 ) 
    guiSetVisible(window, false) 
    showCursor(false) 
    triggerServerEvent("weapon_Name",getLocalPlayer(),weapID,weapName,weapPrice) 
      end 
   end 
end) 
  
   addEventHandler("onClientResourceStart",resourceRoot, 
    function () 
    bindKey("arrow_up", "down",arr ) 
    bindKey("arrow_down", "down",arl ) 
 end)   

Link to comment

An example:

bindKey("arrow_down", "down", 
    function() 
        local scrollPos = guiGridListGetVerticalScrollPosition(grid) 
        guiGridListSetVerticalScrollPosition(grid, scrollPos+1) 
    end 
) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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