Garry's Mod Wiki

DLabelEditable

Description

An editable DLabel, double click on it to edit.

This is used in the spawnmenu spawnlist headers.

Parent

Derives from DLabel.

Methods

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.

Example

Creates a DLabelEditable.

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

Page Links


Special Pages


Wikis

?

Render Time: 39ms

DB GetPage 7
Generate Html 4
SaveChanges (1) 10
Render Body 0
Render Sidebar 16