其他分享
首页 > 其他分享> > Unreal 滑动条异常

Unreal 滑动条异常

作者:互联网

Unreal 列表滑动条异常 listview item scroll

问题由来

当ListView面板显示不下一个Item时 滑动条异常

if (ReGenerateResults.ExactNumLinesOnScreen < 1.0f)
{
	// We are be observing a single row which is larger than the available visible area, so we should calculate thumb size based on that 
	//我们正在观察一个大于可用可见区域的单行,所以我们应该根据它计算拇指大小
    const double VisibleSizeFraction = AllottedGeometry.GetLocalSize().Y / ReGenerateResults.LengthOfGeneratedItems;
	const double ThumbSizeFraction = FMath::Min(VisibleSizeFraction, 1.0);
	const double OffsetFraction = CurrentScrollOffset / NumItemsBeingObserved;
	ScrollBar->SetState( OffsetFraction, ThumbSizeFraction );
}

解决方案

标签:const,double,OffsetFraction,Unreal,滑动,listview,异常
来源: https://www.cnblogs.com/zouqiang/p/16508014.html