첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System;
using System.Windows.Forms;

#region 특정 행으로 스크롤 하기 - Scroll(listView, rowIndex)

/// <summary>
/// 특정 행으로 스크롤 하기
/// </summary>
/// <param name="listView">ListView</param>
/// <param name="rowIndex">행 인덱스</param>
public void Scroll(ListView listView, int rowIndex)
{
    if(listView.Items.Count == 0)
    {
        return;
    }

    rowIndex = Math.Min(Math.Max(0, rowIndex), listView.Items.Count - 1);

    listView.EnsureVisible(rowIndex);
}

#endregion
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요