# DPropertySheet

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

## Açıklama

İçine öğelerle birden çok sekme oluşturabileceğiniz sekme odaklı bir kontrol. Esas olarak organizasyon için kullanılır.

[Kaynağı görüntüle](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/vgui/dpropertysheet.lua)

## Ebeveyn

Bu sayfada listelenmeyen metotları vb. [Panel](https://gmod.tr/wiki/Panel)'den türetir.

## Olaylar

DPropertySheet:[OnActiveTabChanged](https://gmod.tr/wiki/DPropertySheet:OnActiveTabChanged)( [Panel](https://gmod.tr/wiki/Panel) old, [Panel](https://gmod.tr/wiki/Panel) new )

Bir oyuncu sekmeleri değiştirdiğinde çağrılır. Kaynak kod, bunun geçersiz kılınmasının (override) amaçlandığını belirtir.

## Metotlar

[table](https://gmod.tr/wiki/table) DPropertySheet:[AddSheet](https://gmod.tr/wiki/DPropertySheet:AddSheet)( [string](https://gmod.tr/wiki/string) name, [Panel](https://gmod.tr/wiki/Panel) pnl, [string](https://gmod.tr/wiki/string) icon = nil, [boolean](https://gmod.tr/wiki/boolean) noStretchX = false, [boolean](https://gmod.tr/wiki/boolean) noStretchY = false, [string](https://gmod.tr/wiki/string) tooltip = nil )

Yeni bir sekme ekler.

[Panel](https://gmod.tr/wiki/Panel) DPropertySheet:[CloseTab](https://gmod.tr/wiki/DPropertySheet:CloseTab)( [Panel](https://gmod.tr/wiki/Panel) tab, [boolean](https://gmod.tr/wiki/boolean) removePanel )

Sekmeyi ve/veya paneli ebeveyn DPropertySheet'ten kaldırır.

DPropertySheet:[CrossFade](https://gmod.tr/wiki/DPropertySheet:CrossFade)( [table](https://gmod.tr/wiki/table) anim, [number](https://gmod.tr/wiki/number) delta, [table](https://gmod.tr/wiki/table) data )

Bu dahili olarak kullanılır - kullanabiliyor olsanız da muhtemelen kullanmamalısınız. Oyuncu sekmeleri değiştirdiğinde çapraz geçiş (cross fade) animasyonunu yöneten dahili fonksiyondur.

[Panel](https://gmod.tr/wiki/Panel) DPropertySheet:[GetActiveTab](https://gmod.tr/wiki/DPropertySheet:GetActiveTab)()

Bu DPropertySheet'in aktif sekmesini (DTab) döndürür.

[number](https://gmod.tr/wiki/number) DPropertySheet:[GetFadeTime](https://gmod.tr/wiki/DPropertySheet:GetFadeTime)()

Sekmeler arasında geçiş yaparken solma (fade) efektinin ne kadar süreceğini (saniye cinsinden) döndürür. DPropertySheet:SetFadeTime ile ayarlanır

[table](https://gmod.tr/wiki/table) DPropertySheet:[GetItems](https://gmod.tr/wiki/DPropertySheet:GetItems)()

Bu DPropertySheet'in tüm sekmelerinin bir listesini döndürür.

[number](https://gmod.tr/wiki/number) DPropertySheet:[GetPadding](https://gmod.tr/wiki/DPropertySheet:GetPadding)()

Ebeveyn panelden alt panellere olan dolguyu (padding) alır.

[boolean](https://gmod.tr/wiki/boolean) DPropertySheet:[GetShowIcons](https://gmod.tr/wiki/DPropertySheet:GetShowIcons)()

Bunu kullanmamanızı tavsiye ederiz. Gelecekteki bir güncellemede değiştirilebilir veya kaldırılabilir. DPropertySheet:SetShowIcons tarafından ayarlanan herhangi bir değeri döndürür.

DPropertySheet:[SetActiveTab](https://gmod.tr/wiki/DPropertySheet:SetActiveTab)( [Panel](https://gmod.tr/wiki/Panel) tab )

DPropertySheet'in aktif sekmesini ayarlar.

DPropertySheet:[SetFadeTime](https://gmod.tr/wiki/DPropertySheet:SetFadeTime)( [number](https://gmod.tr/wiki/number) time = 0.1 )

Sekmeler arasında geçiş yaparken solma (fade) efektinin ne kadar süreceğini (saniye cinsinden) ayarlar.

DPropertySheet:[SetPadding](https://gmod.tr/wiki/DPropertySheet:SetPadding)( [number](https://gmod.tr/wiki/number) padding = 8 )

Ebeveyn panelden alt panellere olan dolguyu (padding) ayarlar.

DPropertySheet:[SetShowIcons](https://gmod.tr/wiki/DPropertySheet:SetShowIcons)( [boolean](https://gmod.tr/wiki/boolean) show )

Bunu kullanmamanızı tavsiye ederiz. Gelecekteki bir güncellemede değiştirilebilir veya kaldırılabilir. Hiçbir şey yapmaz.

DPropertySheet:[SetupCloseButton](https://gmod.tr/wiki/DPropertySheet:SetupCloseButton)( [function](https://gmod.tr/wiki/function) func )

DPropertySheet'in sağ tarafında, basıldığında verilen geri çağırma (callback) fonksiyonunu çalıştıracak bir kapatma düğmesi oluşturur.

DPropertySheet:[SizeToContentWidth](https://gmod.tr/wiki/DPropertySheet:SizeToContentWidth)()

DPropertySheet'in genişliğini, tüm sekmelerin içeriğine sığacak şekilde ayarlar.

DPropertySheet:[SwitchToName](https://gmod.tr/wiki/DPropertySheet:SwitchToName)( [string](https://gmod.tr/wiki/string) name )

Aktif sekmeyi, verilen isme sahip bir sekmeye değiştirir.

### Örnek

Bu paneli nasıl oluşturup kullanacağınıza dair örnek.

```lua
local frame = vgui.Create( "DFrame" )
frame:SetSize( 500, 300 )
frame:Center()
frame:MakePopup()

local sheet = vgui.Create( "DPropertySheet", frame )
sheet:Dock( FILL )

local panel1 = vgui.Create( "DPanel", sheet )
panel1.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 0, 128, 255, self:GetAlpha() ) ) end
sheet:AddSheet( "test", panel1, "icon16/cross.png" )

local panel2 = vgui.Create( "DPanel", sheet )
panel2.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 255, 128, 0, self:GetAlpha() ) ) end
sheet:AddSheet( "test 2", panel2, "icon16/tick.png" )
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/a211f1bc61ba7fc73a93.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/DPropertySheet
