# DPropertySheet:CloseTab

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

```lua
Panel DPropertySheet:CloseTab( Panel tab, boolean removePanel )
```

## Açıklama

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

## Argümanlar

1. [Panel](https://gmod.tr/wiki/Panel) **tab**: [DPropertySheet](https://gmod.tr/wiki/DPropertySheet)'teki sayfanın [DTab](https://gmod.tr/wiki/DTab)'i. Bakınız: [DPropertySheet:GetItems](https://gmod.tr/wiki/DPropertySheet:GetItems).
2. [boolean](https://gmod.tr/wiki/boolean) **removePanel**: İlişkili panel nesnesini de kaldırmak için true olarak ayarlayın.

## Döndürülen Değer

1. [Panel](https://gmod.tr/wiki/Panel): Sekmenin paneli.

### Örnek

Bu paneli nasıl oluşturup kullanacağınıza ve gereksiz sayfaları nasıl kapatacağınıza dair bir örnek.

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

local MainSheet = vgui.Create( "DPropertySheet", MainFrame )
MainSheet:Dock( FILL )

local First_Panel = vgui.Create( "DPanel", MainSheet )
First_Panel.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 255, 128, 0, self:GetAlpha() ) ) end
MainSheet:AddSheet( "Kullanıcılar Sayfası", First_Panel, "icon16/user.png" )

local Second_Panel = vgui.Create( "DPanel", MainSheet )
Second_Panel.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 0, 128, 255, self:GetAlpha() ) ) end
MainSheet:AddSheet( "Yöneticiler Sayfası", Second_Panel, "icon16/lightning.png" )

if LocalPlayer():IsAdmin() then
	MainSheet:CloseTab( MainSheet:GetItems()[1].Tab ) --1, ilk sayfayı temsil eder
else
	MainSheet:CloseTab( MainSheet:GetItems()[2].Tab ) --2, ikinci sayfayı temsil eder
end
```

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