function blueBerryGoverment()
sexy = guiCreateWindow(192, 123, 209, 353, "Job list", false)
joblist = guiCreateGridList(10, 185, 190, 109, false, sexy)
guiGridListAddColumn(joblist, "Job", 0.9)
for i = 1, 4 do
guiGridListAddRow(joblist)
end
guiGridListSetItemText(joblist, 0, 1, "Job1", false, false)
guiGridListSetItemText(joblist, 1, 1, "Job2", false, false)
guiGridListSetItemText(joblist, 2, 1, "Job3", false, false)
guiGridListSetItemText(joblist, 3, 1, "Job4", false, false)
sexy2 = guiCreateWindow(401, 123, 209, 353, "Second tab", false)
guiSetVisible(sexy2,false)
end
addEvent("requestblueBerryGoverment", true)
addEventHandler("requestblueBerryGoverment", getRootElement(), blueBerryGoverment)
--this part is not working. Why?
addEventHandler( "onClientGUIClick", root,
function( )
if ( source == joblist ) then
local row, col = guiGridListGetSelectedItem ( joblist )
if ( row == -1 ) then return end
local text = guiGridListGetItemText ( joblist, row, col )
if ( text == 'Job1' ) then
---do Something
elseif ( text == 'Job2' ) then
---do Something
elseif ( text == 'Job3' ) then
---do Something
elseif ( text == 'Job4' ) then
---do Something
end
end
end
)