1

德尔福 XE2 更新 4

我在 TPngImageList 上加载了几个 128x128 的 PNG 文件,我要选择一个,或者按索引号或名称,然后分配给 TuniImage.Picture

TUniImage 来自 UniGUIi 框架。然而,它是一个 TPicture 类。我想应该和其他使用它的 TPictures 一样。

4

1 回答 1

5

如果你有一个TPicture,如你所说,那么你分配它的Graphic属性是这样的:

Picture.Graphic := SomeGraphic;

那么,究竟SomeGraphic从何而来。我不清楚TPngImageList你使用的是哪个。TGraphic因此,从中提取 a 的代码TPngImageList可能如下所示:

SomeGraphic := PngImageList.PngImages[0].PngImage;
于 2013-11-12T17:10:31.240 回答