DGrid.AddItem

From GMod Wiki

Jump to: navigation, search
Function
Syntax DGrid:AddItem( Panel panel )
Description:
Adds a panel to the grid.
Returns: nil
In Object: DGrid
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DGrid.AddItem]DGrid.AddItem [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionFill the grid with buttons.
Used onNewerClient.png
Code
for i = 1, 30 do
	local but = vgui.Create( "DButton" )
	but:SetText( i )
	but:SetSize( 30, 20 )
	grid:AddItem( but )
end
 
OutputA grid full of buttons.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox