3
今天我的問題是關於在組件中創建PNG圖像的集合。 我發現一個按鈕,接受PNG圖像作爲gliph,但它使用的圖像的四種狀態是這樣構成的PNG圖片:組件中的Delphi PNG圖像集合
我已經修改了組件的採用四型動物圖像,每一個爲一個單一的國家。所以,我的組件看起來是這樣的:
...
public
FPngImgEnabled: TPngImage;
FPngImgDisabled: TPngImage;
FPngImgDown: TPngImage;
FPngImgOver: TPngImage;
FDown: Boolean;
Constructor Create(AOwner: TComponent); override;
Destructor Destroy; override;
procedure Paint; override;
published
property PngImgEnabled: TPngImage read FPngImgEnabled write SetPngImgEnabled;
property PngImgDisabled: TPngImage read FPngImgDisabled write SetPngImgDisabled;
property PngImgDown: TPngImage read FPngImgDown write SetPngImgDown;
property PngImgOver: TPngImage read FPngImgOver write SetPngImgOver;
...
是這樣,我有一個部件有四個PNG圖像,然後SetPng ...程序。我想知道是否有辦法使用四個PNG圖像的集合;像「TPNGImagesList」,用於將圖像集中在一個地方。
有什麼錯了'TImageList'? – fantaghirocco
[PngComponents](https://code.google.com/archive/p/cubicexplorer/downloads)中包含TPngImageList。也許這符合你的需求。也許還有一個現成的按鈕 - 我沒有檢查過。 –
伴隨着:TPNGImageList有什麼問題?順便說一句,哪個Delphi版本? –