Jump to content

Gridlist


Recommended Posts

function bonusmenuegui() 
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
  
BonusmenueGui = guiCreateWindow(361,203,318,353,"Bonusmenue",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,28,212,307,false,BonusmenueGui) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Bonus",0.2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Status",0.2) 
  
for i = 1,14 do 
    guiGridListAddRow(GUIEditor_Grid[1]) 
end 
  
guiGridListSetItemText(GUIEditor_Grid[1],0,1,"") 
  
guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Kampfstil") 
  
guiGridListSetItemText(GUIEditor_Grid[1],2,1,"Boxen[10]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],3,1,"Taek-Kwon-Do[15]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],4,1,"Streetfighting[20]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],5,1,"-----------------------------------------------------------------") 
  
guiGridListSetItemText(GUIEditor_Grid[1],6,1,"Lizensen") 
  
guiGridListSetItemText(GUIEditor_Grid[1],7,1,"Gewerbungslizens[20]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],8,1,"Freikaufslizens[10]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],9,1,"Beamtenlizens[10]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],10,1,"---------------------------------------------------") 
  
guiGridListSetItemText(GUIEditor_Grid[1],11,1,"Waffenskills") 
  
guiGridListSetItemText(GUIEditor_Grid[1],12,1,"M4[20]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],13,1,"MP5[15]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],0,2,"") 
  
guiGridListSetItemText(GUIEditor_Grid[1],1,2,"") 
  
guiGridListSetItemText(GUIEditor_Grid[1],2,2,"[]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],3,2,"[]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],4,2,"[]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],5,2,"------------------------------------------") 
  
guiGridListSetItemText(GUIEditor_Grid[1],6,2,"") 
  
guiGridListSetItemText(GUIEditor_Grid[1],7,2,"[]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],8,2,"[]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],9,2,"[]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],10,2,"----------------------------------------------") 
  
guiGridListSetItemText(GUIEditor_Grid[1],11,2,"") 
  
guiGridListSetItemText(GUIEditor_Grid[1],12,2,"[]") 
  
guiGridListSetItemText(GUIEditor_Grid[1],13,2,"[]") 
BMKaufen = guiCreateButton(231,283,76,23,"Kaufen",false,BonusmenueGui) 
BMSchliesen = guiCreateButton(232,318,75,23,"Schliessen",false,BonusmenueGui) 
  
addEventHandler("onClientGUIClick", BMSchliesen, BMSchliessen) 
  
end 

The Gridlist Items don't show. I don't know why oO

I used the GUI Editor

Link to comment

Doesn't show anyway

for  do -- WHAT DO I HAVE TO TYPE IN HERE? 
  
local row = guiGridListAddRow ( GUIEditor_Grid[1] ) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, boni, "Hello", false, false ) 
  
end 

I think this could be one error.

Link to comment
Doesn't show anyway
for  do -- WHAT DO I HAVE TO TYPE IN HERE? 
  
local row = guiGridListAddRow ( GUIEditor_Grid[1] ) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, boni, "Hello", false, false ) 
  
end 

I think this could be one error.

i create this for test:

it works

  
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),function()     
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
  
BonusmenueGui = guiCreateWindow(361,203,318,353,"Bonusmenue",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,28,212,307,false,BonusmenueGui) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Bonus",0.2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Status",0.2) 
  
for i = 1,14 do  -- it adds a row that is from 1 to 14  
    guiGridListAddRow(GUIEditor_Grid[1]) 
end 
  
guiGridListSetItemText(GUIEditor_Grid[1],0,1,"",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Kampfstil",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],2,1,"Boxen[10]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],3,1,"Taek-Kwon-Do[15]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],4,1,"Streetfighting[20]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],5,1,"-----------------------------------------------------------------",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],6,1,"Lizensen",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],7,1,"Gewerbungslizens[20]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],8,1,"Freikaufslizens[10],false, false") 
  
guiGridListSetItemText(GUIEditor_Grid[1],9,1,"Beamtenlizens[10]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],10,1,"---------------------------------------------------",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],11,1,"Waffenskills",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],12,1,"M4[20]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],13,1,"MP5[15]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],0,2,"",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],1,2,"",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],2,2,"[]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],3,2,"[]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],4,2,"[]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],5,2,"------------------------------------------",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],6,2,"",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],7,2,"[]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],8,2,"[]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],9,2,"[]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],10,2,"----------------------------------------------",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],11,2,"") 
  
guiGridListSetItemText(GUIEditor_Grid[1],12,2,"[]",false, false) 
  
guiGridListSetItemText(GUIEditor_Grid[1],13,2,"[]",false, false) 
BMKaufen = guiCreateButton(231,283,76,23,"Kaufen",false,BonusmenueGui) 
BMSchliesen = guiCreateButton(232,318,75,23,"Schliessen",false,BonusmenueGui) 
  
addEventHandler("onClientGUIClick", BMSchliesen, BMSchliessen) 
  
end 
) 
  

Screen:

http://imageshack.us/f/819/mtascreen20110530113056.png/

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...