DGrid.AddItem
From GMod Wiki
| Function | |
| Syntax | DGrid:AddItem( Panel panel ) |
| Description: | |
| Adds a panel to the grid. | |
| Returns: | nil |
| In Object: | DGrid |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=DGrid.AddItem]DGrid.AddItem [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Fill the grid with buttons. |
|---|---|
| Used on | |
| Code | for i = 1, 30 do local but = vgui.Create( "DButton" ) but:SetText( i ) but:SetSize( 30, 20 ) grid:AddItem( but ) end |
| Output | A grid full of buttons. |