# Panel:SetToFullHeight

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

```lua
Panel:SetToFullHeight()
```

## Açıklama

Bir [RichText](https://gmod.tr/wiki/RichText) elementinin yüksekliğini, içindeki metni sığdıracak şekilde ayarlar.

> **NOT:** Bu fonksiyon dahili olarak [Panel:GetNumLines](https://gmod.tr/wiki/Panel:GetNumLines) fonksiyonuna dayanır, bu yüzden metni [Panel:AppendText](https://gmod.tr/wiki/Panel:AppendText) kullanarak değiştirdikten en az birkaç kare sonra çağrılmalıdır.

### Örnek

Yüksekliği ayarlanmamış bir [RichText](https://gmod.tr/wiki/RichText) paneli oluşturur. Farkı göstermek amacıyla, doğru yükseklik panel oluşturulduktan 2 saniye sonra uygulanır.

```lua
-- Bir pencere çerçevesi oluştur
TextFrame = vgui.Create("DFrame")
TextFrame:SetSize(250, 210)
TextFrame:Center()
TextFrame:SetTitle("Yükseklik ayarlanmadı")
TextFrame:MakePopup()

-- RichText paneli
local richtext = vgui.Create("RichText", TextFrame)
richtext:SetPos(10, 30)
richtext:SetWidth(230)

-- Metin bloğu
richtext:AppendText("#ServerBrowser_ServerWarning_MaxPlayers")

function richtext:PerformLayout() self:SetBGColor(Color(0, 0, 0)) end

-- 2 saniye sonra tam yüksekliğe ayarla
timer.Simple(2, function()

	richtext:SetToFullHeight()

	TextFrame:SetTitle("Tam yükseklik ayarlandı")

end)
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/bf56b7bcb7d462893a6e.gif)

- [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:SetToFullHeight
