Garry's Mod Wiki

DLabelEditable

DLabelEditable

Description

An editable DLabel, double click on it to edit.

This is used in the spawnmenu spawnlist headers.

Parent

Derives methods, etc not listed on this page 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!" )

Special Pages


Wikis

?

Render Time: 22ms

DB GetPage 2
Generate Html 4
SaveChanges (1) 6
Render Body 0
Render Sidebar 8