# Panel:SetText

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

```lua
Panel:SetText( string text )
```

## Açıklama

[Label](https://gmod.tr/wiki/Label), [TextEntry](https://gmod.tr/wiki/TextEntry) veya [RichText](https://gmod.tr/wiki/RichText) gibi metin içeren bir panel nesnesinin ve [DLabel](https://gmod.tr/wiki/DLabel), [DTextEntry](https://gmod.tr/wiki/DTextEntry) veya [DButton](https://gmod.tr/wiki/DButton) gibi türevlerinin metin değerini ayarlar.

> **UYARI:** Bir [Label](https://gmod.tr/wiki/Label) veya türevlerinde ( [DLabel](https://gmod.tr/wiki/DLabel) ve [DButton](https://gmod.tr/wiki/DButton) ) kullanıldığında, otomatik olarak [Panel:InvalidateLayout](https://gmod.tr/wiki/Panel:InvalidateLayout) fonksiyonunu çağırır. Bu da, gereksiz performans kaybını önlemek için bu fonksiyonu bu panellerde her karede (frame) çalıştırmaktan kaçınmanız gerektiği anlamına gelir.

> **UYARI:** [Label](https://gmod.tr/wiki/Label) ve türevlerinin sabit bir uzunluk sınırı vardır, en fazla 1023 ASCII karakteridir.

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **text**: Ayarlanacak metin değeri.

### Örnek

Bir [RichText](https://gmod.tr/wiki/RichText) elemanı oluşturur ve metnini yerelleştirilmiş bir dizeye ayarlar; varsayılan VAC reddetme mesajı.

```lua
-- RichText için pencere çerçevesi
TextFrame = vgui.Create("DFrame")
TextFrame:SetSize(250, 150)
TextFrame:Center()
TextFrame:SetTitle("#VAC_ConnectionRefusedTitle") -- Sonucu "Connection Refused - VAC" olur

-- RichText paneli
local richtext = vgui.Create("RichText", TextFrame)
richtext:Dock(FILL)

-- Metni, VAC tarafından yasaklandığınızda aldığınız mesaja ayarlar
richtext:SetText("#VAC_ConnectionRefusedDetail")
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/7bc30c4ea8041786a410.png)

- [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/Panel:SetText
