# vgui.RegisterTable

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

```lua
table vgui.RegisterTable( table panel, string base = "Panel" )
```

## Açıklama

[vgui.CreateFromTable](https://gmod.tr/wiki/vgui.CreateFromTable) ile kullanılmak üzere, bir tabloyu panel olarak kullanmak için kaydeder.

Bu fonksiyonun tek yaptığı, tablonuza Base anahtarını atamak ve tabloyu döndürmektir.

## Argümanlar

1. [table](https://gmod.tr/wiki/table) **panel**: [PANEL](https://gmod.tr/wiki/Panel) tablosu.
2. [string](https://gmod.tr/wiki/string) **base** = "Panel": Panel için bir temel.

## Döndürdüğü Değer

1. [table](https://gmod.tr/wiki/table): [PANEL](https://gmod.tr/wiki/Panel) tablosu

### Örnek

```lua
local CustomPanel = {
    Init = function( self )
        self:SetSize( 200, 100 )
    end,

    Paint = function( self, w, h )
        surface.SetDrawColor( 0, 255, 0, 255 )
        surface.DrawRect( 0, 0, w, h)
    end,
}

local my_custom_panel = vgui.RegisterTable( CustomPanel, "Panel" ) -- Panel sınıfını bir tablodan kaydeder

local panel = vgui.CreateFromTable( my_custom_panel ) -- Panelin bir örneğini oluşturur
panel:SetPos( 50, 50 )
```

- [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/vgui.RegisterTable
