# DTextEntry:GetAutoComplete

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

```lua
table DTextEntry:GetAutoComplete( string inputText )
```

## Açıklama

Otomatik tamamlama seçenekleri listesi istendiğinde DTextEntry tarafından çağrılır. Üzerine yazılması (override edilmesi) amaçlanmıştır.

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **inputText**: Oyuncunun mevcut girdisi.

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

1. [table](https://gmod.tr/wiki/table): Eğer bir tablo döndürülürse, tablonun değerleri kullanıcıya otomatik tamamlama önerileri olarak gösterilir.

### Örnek

Aralarından seçim yapılabilecek bir oyuncu listesi gösterir.

```lua
local frame = vgui.Create( "DFrame" )
frame:SetSize( 300, 300 )
frame:SetTitle( "Otomatik Tamamlama Örneği" )
frame:Center()
frame:MakePopup()

local label = vgui.Create( "DLabel", frame )
label:SetText( "Bir oyuncu yazın..." )
label:Dock( TOP )

local textentry = vgui.Create( "DTextEntry", frame )
textentry:Dock( TOP )
function textentry:GetAutoComplete( text )
    local suggestions = {}

    for _, ply in ipairs( player.GetAll() ) do -- Her oyuncu için,
        if string.StartsWith( ply:Nick(), text ) then -- eğer oyuncunun adı bununla başlıyorsa...
            table.insert( suggestions, ply:Nick() ) -- ... listeye ekle.
        end
    end

	return suggestions
end
```

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