虚拟列表(父)套普通列表(子)的渲染回调问题
public static int GetVirtualListItemIndex(GList gList, GObject obj)
{
int childIndex = gList.GetChildIndex(obj);
int itemIndex = gList.ChildIndexToItemIndex(childIndex);
return itemIndex;
}
有一个虚拟列表, 每一行都是一个包含了普通列表(3列)的component, 在普通列表的渲染回调调用上面的接口,
GetVirtualListItemIndex(gList, obj.parent.parent);
找到数据对象的索引, 在虚拟列表缓慢滚动时没有问题, 但是快速滚动时, 例如用鼠标滚轮滚动, 会导致这个方法返回了错误的索引, 请问是此方法有错误, 还是其他什么机制导致的
{
int childIndex = gList.GetChildIndex(obj);
int itemIndex = gList.ChildIndexToItemIndex(childIndex);
return itemIndex;
}
有一个虚拟列表, 每一行都是一个包含了普通列表(3列)的component, 在普通列表的渲染回调调用上面的接口,
GetVirtualListItemIndex(gList, obj.parent.parent);
找到数据对象的索引, 在虚拟列表缓慢滚动时没有问题, 但是快速滚动时, 例如用鼠标滚轮滚动, 会导致这个方法返回了错误的索引, 请问是此方法有错误, 还是其他什么机制导致的
没有找到相关结果
已邀请:
1 个回复
谷主
赞同来自: