From Garry's Mod
A shortcut for this is CreateSprite().
Inherits the following functions from DPanel and its parents up to 3 levels deep:
Creates a DSprite with the sent_ball material, and sets the color to cyan.
local sprite = vgui.Create("DSprite") sprite:SetMaterial(Material("sprites/sent_ball")) sprite:SetColor(Color(0, 255, 255)) sprite:Center() sprite:SetSize(200, 200)
See Preview above.