# DProperty\_Combo

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

## Açıklama

> **DAHİLİ:** Bu dahili olarak kullanılır - kullanabiliyor olsanız da muhtemelen kullanmamalısınız.

Bir [DProperties](https://gmod.tr/wiki/DProperties) paneli için [DComboBox](https://gmod.tr/wiki/DComboBox) kontrolü.

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

## Ebeveyn

Bu sayfada listelenmeyen metotları vb. [DProperty_Generic](https://gmod.tr/wiki/DProperty_Generic)'ten miras alır.

## Metotlar

DProperty_Combo:[AddChoice](https://gmod.tr/wiki/DProperty_Combo:AddChoice)( [string](https://gmod.tr/wiki/string) Text, [any](https://gmod.tr/wiki/any) data, [boolean](https://gmod.tr/wiki/boolean) select = false )

Birleşik giriş kutusu kontrolünüze bir seçenek ekler.

DProperty_Combo:[DataChanged](https://gmod.tr/wiki/DProperty_Combo:DataChanged)( [any](https://gmod.tr/wiki/any) data )

Kullanıcı yeni bir değer seçtikten sonra çağrılır.

DProperty_Combo:[SetSelected](https://gmod.tr/wiki/DProperty_Combo:SetSelected)( [number](https://gmod.tr/wiki/number) Id )

Seçili seçeneği ayarlar.

DProperty_Combo:[Setup](https://gmod.tr/wiki/DProperty_Combo:Setup)( [table](https://gmod.tr/wiki/table) data = { text = 'Select...' } )

Bu dahili olarak kullanılır - kullanabiliyor olsanız da muhtemelen kullanmamalısınız. Bir birleşik giriş kutusu kontrolü kurar.

### Örnek

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

local DP = vgui.Create( "DProperties", Panel )
DP:Dock( FILL )

local choice = DP:CreateRow( "Choices", "Combo #1: Default" )
choice:Setup( "Combo", {} )
choice:AddChoice( "Allow", true )
choice:AddChoice( "Disallow", false )

local choice = DP:CreateRow( "Choices", "Combo #2: Custom default text" )
choice:Setup( "Combo", { text = "Select type..." } )
choice:AddChoice( "Table", {} )
choice:AddChoice( "Function", function() end )
choice:AddChoice( "String", "Hello world" )
choice.DataChanged = function( self, data )
    print( "You selected: ", data )
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/DProperty_Combo
