Garry's Mod Wiki

DTextEntry:OnLoseFocus

DTextEntry:OnLoseFocus()

Description

Called whenever the DTextEntry lose focus.

Example

local default = "Brick with bob" local textentry = vgui.Create( "DTextEntry" ) textentry:SetText( default ) textentry.OnLoseFocus = function( self ) if self:GetValue() == "" then self:SetValue( default ) end end
Output: DTextEntry value reset to default value if the text entered is empty.

Page Links


Special Pages


Wikis

?

Render Time: 40ms

DB GetPage 2
Generate Html 1
SaveChanges (1) 21
Render Body 0
Render Sidebar 14