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.