Garry's Mod Wiki



An editable DLabel, double click on it to edit.

This is used in the spawnmenu spawnlist headers.


Derives methods, etc not listed on this page from DLabel.


boolean DLabelEditable:GetAutoStretch()
Returns whether the editable label will stretch to the text entered or not.
string DLabelEditable:OnLabelTextChanged( string txt )
A hook called when the player presses Enter (i.e. the finished editing the label) and the text has changed. Allows you to override/modify the text that will be set to display.
DLabelEditable:SetAutoStretch( boolean stretch )
Sets whether the editable label should stretch to the text entered or not.


Creates a DLabelEditable.

local EditLabel = vgui.Create( "DLabelEditable" ) EditLabel:SetPos( 40, 40 ) EditLabel:SetSize( 70, 30) EditLabel:SetText( "Hello, world!" )