StopRedraw

停止绘制ListView,通常在大量添加行的时候先执行StopRedraw,添加结束后再执行ResueRedraw恢复绘制,以提高效率。

示例

Dim lvw As WinForm.ListView = e.Form.Controls("ListView1")
lvw
.View = ViewMode.SmallIcon
lvw
.StopRedraw
For
i As Integer = 1 To 1000
    Dim vr As WinForm.ListViewRow = lvw.Rows.Add()
   
vr.Name = i
    vr.Text = "项目"  &
i

Next

lvw
.ResumeRedraw

 


本页地址:http://www.foxtable.com/webhelp/topics/2845.htm