I know the BrightIdeasSoftware/ObjectListView is a legacy project, but I have invested some time in it only to later notice that the TreeListView control is very sluggish, so much as moving in the list up and down using arrow keys is no longer an option.
I'd hate to abandon this control at this point as there are no better free Winforms treelistview controls avaiable. On a Win7 machine it still isn't fast, but MUCH better than on Win10. Any ideas what is causing this?
Example code to populate a simple TreeListView:
public partial class Form1 : Form
{
public class Node
{
public int RowIndex { get; set; }
};
private List<Node> nodes = new List<Node>();
public Form1()
{
InitializeComponent();
var colCount = 5;
var rowCount = 200;
for(int i = 0; i < colCount; i++)
{
var col = new OLVColumn() { Text = $"Column {i} " };
var index = i; // Can't use i directly inside lambda
col.AspectGetter = obj => $"Row: {(obj as Node).RowIndex}, Col: {index}";
treeListView1.AllColumns.Add(col);
}
for(int i = 0; i < rowCount; i++)
{
var n = new Node()
{
RowIndex = i,
};
nodes.Add(n);
}
treeListView1.RebuildColumns();
treeListView1.Objects = nodes;
}
}
EDIT: I tried the package at https://www.myget.org/feed/geomatics/package/nuget/ObjectListView.Official, which seems to have this issue fixed, but it is not rendering TreeView lines and expanders at all.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…