# DComboBox:GetOptionText

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

```lua
string DComboBox:GetOptionText( number index )
```

## Açıklama

Verilen indekse göre bir seçeneğin metnini döndürür.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **index**: Seçeneğin indeksi.

## Döndürdükleri

1. [string](https://gmod.tr/wiki/string): Seçeneğin metin değeri.

### Örnek

Bazı renkleri listeleyen bir açılır kutu oluşturun ve 3. seçeneğin metnini yazdırın.

```lua
local cbox = vgui.Create("DComboBox")
cbox:SetPos(5, 5)
cbox:SetSize(200, 20)

cbox:SetValue("Colors")
cbox:AddChoice("Red")
cbox:AddChoice("Green")
cbox:AddChoice("Blue")
cbox:AddChoice("Yellow")

print(cbox:GetOptionText(3))
```

**Çıktı:** Blue

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