DGS Grid List: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 25: | Line 25: | ||
dgsGridListAddColumn(gridlist,"test1",0.4) | dgsGridListAddColumn(gridlist,"test1",0.4) | ||
local row = dgsGridListAddRow(gridlist) | local row = dgsGridListAddRow(gridlist) | ||
outputChatBox(row) -- | outputChatBox(row) --output: 1 | ||
-------------------------GUI | -------------------------GUI | ||
local gridlist = guiCreateGridList(100,100,400,400,false) | local gridlist = guiCreateGridList(100,100,400,400,false) | ||
guiGridListAddColumn(gridlist,"test1",0.4) | guiGridListAddColumn(gridlist,"test1",0.4) | ||
local row = guiGridListAddRow(gridlist) | local row = guiGridListAddRow(gridlist) | ||
outputChatBox(row) -- | outputChatBox(row) --output: 0 | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 06:49, 20 July 2018
Sotring
- DGS Grid List fixed sorting problem
loadstring(exports.dgs:dgsImportFunction())() local gridlist = dgsCreateGridList(100,100,400,400,false) dgsGridListAddColumn(gridlist,"test1",0.4) dgsGridListAddColumn(gridlist,"test2",0.4) ----------------Click the column to enable the built-in sorting. addCommandHandler("addRow",function() for i=1,20 do local row = dgsGridListAddRow(gridlist) dgsGridListSetItemText(gridlist,row,1,i) dgsGridListSetItemText(gridlist,row,2,i-1) --No Bugs end end)
Row Index
- The Row Index of DGS Grid List is different from GUI Grid List
-------------------------DGS loadstring(exports.dgs:dgsImportFunction())() local gridlist = dgsCreateGridList(100,100,400,400,false) dgsGridListAddColumn(gridlist,"test1",0.4) local row = dgsGridListAddRow(gridlist) outputChatBox(row) --output: 1 -------------------------GUI local gridlist = guiCreateGridList(100,100,400,400,false) guiGridListAddColumn(gridlist,"test1",0.4) local row = guiGridListAddRow(gridlist) outputChatBox(row) --output: 0