# DListView:OnRowSelected

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

```lua
DListView:OnRowSelected( number rowIndex, Panel row )
```

## Açıklama

Bir satır seçildiğinde [DListView:OnClickLine](https://gmod.tr/wiki/DListView:OnClickLine) tarafından dahili olarak çağrılır. Bu, bir satır seçildiğinde davranışı tanımlamak için geçersiz kılmanız (override) gereken fonksiyondur.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **rowIndex**: Kullanıcının tıkladığı satırın indeksi.
2. [Panel](https://gmod.tr/wiki/Panel) **row**: Kullanıcının tıkladığı [DListView_Line](https://gmod.tr/wiki/DListView_Line).

### Örnek

Tıklanan satırın ilk iki sütun değerini yazdırır. Bu örnekte bu değerler, listede seçilen oyuncunun takma adı ve öldürme sayısıdır.

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

local listView = frame:Add( "DListView" )
listView:Dock( FILL )

listView:AddColumn( "Nick" )
listView:AddColumn( "Frags" )

for i, ply in ipairs( player.GetAll() ) do
	listView:AddLine( ply:Nick(), ply:Frags() )
end
listView.OnRowSelected = function( panel, rowIndex, row )
	print( row:GetValue( 1 ) )
	print( row:GetValue( 2 ) )
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/DListView:OnRowSelected
