Jump to content

GRID


Multi

Recommended Posts

doBusow = guiCreateGridList(425, 313, 400, 209, false) 
guiGridListAddColumn(doBusow, "Tra", 0.2) 
guiGridListAddColumn(doBusow, "Wy", 0.2) 
guiGridListAddColumn(doBusow, "lop", 0.2) 
guiGridListAddColumn(doBusow, "Do", 0.2) 
guiGridListAddColumn(doBusow, "Od", 0.2) 
for i = 1, 2 do 
guiGridListAddRow(doBusow) 
end 
guiGridListSetItemText(doBusow, 0, 1, "1889", false, false) 
guiGridListSetItemText(doBusow, 0, 2, "1k 1sc", false, false) 
guiGridListSetItemText(doBusow, 0, 3, "LV", false, false) 
guiGridListSetItemText(doBusow, 0, 4, "LS", false, false) 
guiGridListSetItemText(doBusow, 0, 5, "0", false, false)  
guiSetVisible (doBusow, false) 

How to do that if I click ROW 1 then i gonna have message on chat "Hello". Sorrz for bad english

Link to comment

Try that

doBusow = guiCreateGridList(425, 313, 400, 209, false) 
guiGridListAddColumn(doBusow, "Tra", 0.2) 
guiGridListAddColumn(doBusow, "Wy", 0.2) 
guiGridListAddColumn(doBusow, "lop", 0.2) 
guiGridListAddColumn(doBusow, "Do", 0.2) 
guiGridListAddColumn(doBusow, "Od", 0.2) 
for i = 1, 2 do 
local row = guiGridListAddRow(doBusow) 
end 
guiGridListSetItemText(doBusow, row, 1, "1889", false, false) 
guiGridListSetItemText(doBusow, row, 2, "1k 1sc", false, false) 
guiGridListSetItemText(doBusow, row, 3, "LV", false, false) 
guiGridListSetItemText(doBusow, row, 4, "LS", false, false) 
guiGridListSetItemText(doBusow, row, 5, "0", false, false) 
guiSetVisible (doBusow, false) 
  
addEventHandler("onClientGUIClick",doBusow, 
function(b) 
if b == "left" then 
local selected = guiGridListGetItemText(doBusow, guiGridListGetSelectedItem(doBusow), 1) 
if selected == "1889" then 
outputChatBox("Hello") 
end 
end 
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...