# DComboBox:SetValue

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

```lua
DComboBox:SetValue( string value )
```

## Açıklama

Menü kapalı değilken birleşik giriş kutusunda (combo box) gösterilen metni ayarlar.

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **value**: DComboBox içindeki metin.

### Örnek

Bir seçeneğe tıklandıktan sonra değeri bir teşekkür mesajına ayarlanan basit bir geri bildirim birleşik giriş kutusu.

```lua
BGPanel = vgui.Create("DPanel")
BGPanel:SetPos(20, 20)
BGPanel:SetSize(200, 30)

local cbox = vgui.Create("DComboBox", BGPanel)
cbox:SetPos(5, 5)
cbox:SetSize(190, 20)

cbox:SetValue("What do you think of this server?")

-- Yanıtlar
cbox:AddChoice("It's the best server of all time!")
cbox:AddChoice("It's pretty good.")
cbox:AddChoice("It's okay.")
cbox:AddChoice("It's not that good.")
cbox:AddChoice("Don't bother me with this.")

function cbox:OnSelect(index, value, data)

	-- Birleşik giriş kutusunu temizle ve bir teşekkür mesajı ayarla
	self:Clear()
	self:SetText("Thank you for your feedback!")

	-- Burada geri bildirimi sunucuya bir ağ mesajı (net message) kullanarak gönderirsiniz
	-- Seçim 'data' değişkeninde saklanır

end
```

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