向HBox添加许多图像会导致Flex中出现显示问题

时间:2022-03-23 15:53:47

In Flex, I'm using an HBox to hold thumbnails. When more thumbnails are added than can be shown, the HBox becomes scrollable.

在Flex中,我使用HBox来保存缩略图。当添加的缩略图多于可显示的缩略图时,HBox变为可滚动。

When I add more than, say, 80 images, when I scroll back to the first image, the images begin "tearing", until I hover my mouse over them.

当我添加超过80个图像时,当我滚动回第一个图像时,图像开始“撕裂”,直到我将鼠标悬停在它们上面。

This is how it looks when few images are added:

这是添加少量图像时的外观:

向HBox添加许多图像会导致Flex中出现显示问题

When many images are added:

添加许多图像时:

向HBox添加许多图像会导致Flex中出现显示问题

Should I be using something other than an HBox to accomplish this?

我应该使用除HBox之外的其他东西来实现这一目标吗?

2 个解决方案

#1


HBox doesn't use virtual renders so I'd actually recommend a List based control like HorizontalList. You may also want to use Ely Greenfield's SuperImage to avoid flicker when scrolling.

HBox不使用虚拟渲染,所以我实际上建议使用像Horizo​​ntalList这样的基于List的控件。您可能还想使用Ely Greenfield的SuperImage来避免滚动时闪烁。

#2


Use a TileList. It can use ItemRenderers which uses fewer resources.

使用TileList。它可以使用使用较少资源的ItemRenderers。

#1


HBox doesn't use virtual renders so I'd actually recommend a List based control like HorizontalList. You may also want to use Ely Greenfield's SuperImage to avoid flicker when scrolling.

HBox不使用虚拟渲染,所以我实际上建议使用像Horizo​​ntalList这样的基于List的控件。您可能还想使用Ely Greenfield的SuperImage来避免滚动时闪烁。

#2


Use a TileList. It can use ItemRenderers which uses fewer resources.

使用TileList。它可以使用使用较少资源的ItemRenderers。