DPanelList.AddItem
From GMod Wiki
| Function | |
| Syntax | DPanelList:AddItem( Panel panel ) |
| Description: | |
| Adds a new item in to a DPanelList. | |
| Returns: | nil |
| In Object: | DPanelList |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=DPanelList.AddItem]DPanelList.AddItem [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Adds a button in to a DPanelList. |
|---|---|
| Used on | |
| Code | local PanelList = vgui.Create("DPanelList"); PanelList:SetSize(50, 200); PanelList:SetPos(300, 400); local MyButton = vgui.Create("DButton", PanelList) MyButton:SetText("Test button for the list") MyButton:SizeToContents(); PanelList:AddItem(MyButton); |
| Output | A DPanelList with a button in it. |