# DTextEntry:OnLoseFocus

- **Ortam:** İstemci, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/DTextEntry:OnLoseFocus
- **Çeviri tarihi:** 2025-09-08

```lua
DTextEntry:OnLoseFocus()
```

## Açıklama

[DTextEntry](https://gmod.tr/wiki/DTextEntry) odağını kaybettiğinde çağrılır.

### Örnek

```lua
concommand.Add( "test_textentry_onlosefocus", function(ply)
	local frame = vgui.Create( "DFrame" )
	frame:SetSize( 400, 200 )
	frame:Center()
	frame:MakePopup()

	local default = "Brick with bob"

	local textentry = vgui.Create( "DTextEntry", frame )
	textentry:SetText( default )
	textentry:Dock( TOP )
	textentry.OnLoseFocus = function( self )
		if ( self:GetText() == "" ) then
			self:SetText( default )
		end
	end

end )
```

**Çıktı:** Girilen metin boşsa DTextEntry değeri varsayılan değere sıfırlanır.

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/DTextEntry:OnLoseFocus
