Garry's Mod Wiki



We advise against using this. It may be changed or removed in a future update. This is derived from the deprecated DPanelList.

A vertical list of models.


Derives from DPanelSelect.


DModelSelect:SetHeight( number num = 2 )
Sets the height of the panel in the amount of 64px spawnicons. Overrides Panel:SetHeight.
DModelSelect:SetModelList( table models, string convar, boolean dontSort, boolean DontCallListConVars )
Called to set the list of models within the panel element.


Creates a DModelSelect within a DFrame and adds four models.

-- Create a table of models local models = { ["models/props_c17/oildrum001_explosive.mdl"] = {}, ["models/props_c17/oildrum001.mdl"] = {}, ["models/props_junk/TrafficCone001a.mdl"] = {}, ["models/props_c17/gravestone004a.mdl"] = {} } local frame = vgui.Create("DFrame") frame:SetSize(220, 220) frame:SetTitle("DModelSelect Example") frame:MakePopup() frame:Center() local mselect = vgui.Create( "DModelSelect", frame ) mselect:SetModelList( models, "", false, true ) mselect:SetSize(150, 150) mselect:Center()
Output: See Preview

Page Links

Special Pages



Render Time: 83ms

DB GetPage 3
Generate Html 11
SaveChanges (1) 10
Render Body 0
Render Sidebar 14