C
C# Learner
Has anyone else noticed ListView's unbearable flickering?
I have a project containing a list-view with the following:
- View: Details
- Columns: 5
The following code causes the list-view to flicker:
private void TestListView()
{
const int Num = 20;
const string Text = "Test";
listView.BeginUpdate();
listView.Items.Clear();
ListViewItem[] items = new ListViewItem[Num];
for (int i = 0; i < items.Length; ++i) {
ListViewItem item = new ListViewItem(Text);
item.SubItems.Add(Text);
items = item;
}
listView.Items.AddRange(items);
listView.EndUpdate();
}
It looks like .NET let me down again; I might have to use another
framework for the project due to this.
I have a project containing a list-view with the following:
- View: Details
- Columns: 5
The following code causes the list-view to flicker:
private void TestListView()
{
const int Num = 20;
const string Text = "Test";
listView.BeginUpdate();
listView.Items.Clear();
ListViewItem[] items = new ListViewItem[Num];
for (int i = 0; i < items.Length; ++i) {
ListViewItem item = new ListViewItem(Text);
item.SubItems.Add(Text);
items = item;
}
listView.Items.AddRange(items);
listView.EndUpdate();
}
It looks like .NET let me down again; I might have to use another
framework for the project due to this.