Jump to content
Sign in to follow this  
zjg076000

virtualimagelist1 cannot be loaded dynamically

Recommended Posts

After the imagecollection can add pictures, but virtualimagelist1 cannot be loaded dynamically, but when it is added manually, the bound pictures can be displayed, and the dynamic loading cannot be displayed,

 


procedure TForm2.Button1Click(Sender: TObject);
begin
    ImageCollection2.Add('1','D:\pict\1.png');
    ImageCollection2.Add('2','D:\pict\2.png');
     ImageCollection2.Add('3','D:\pict\2.png');
    VirtualImageList1.ImageCollection:=ImageCollection1;
    VirtualImageList1.UpdateImageList;
end;

Share this post


Link to post

Check out the AutoFill property of the VirtualImageList. It should be true in order to load all the images from the image collection. 

 

 

Share this post


Link to post
On 2022/7/13 at PM11点58分, Lajos Juhász said:

查看 VirtualImageList 的 AutoFill 属为了从图像集合中加载所有图像,它应该是正确的。 

 

VirtualImageList .autofill:=true  , because when it is added manually, the bound pictures can be displayed ,After the imagecollection can add pictures, but virtualimagelist1 cannot be loaded dynamically, 

On 2022/7/13 at PM11点27分, zjg076000 said:

After the imagecollection can add pictures, but virtualimagelist1 cannot be loaded dynamically, but when it is added manually, the bound pictures can be displayed, and the dynamic loading cannot be displayed,

 


procedure TForm2.Button1Click(Sender: TObject);
begin
    ImageCollection2.Add('1','D:\pict\1.png');
    ImageCollection2.Add('2','D:\pict\2.png');
     ImageCollection2.Add('3','D:\pict\2.png');
    VirtualImageList1.ImageCollection:=ImageCollection1;
    VirtualImageList1.UpdateImageList;
end;

 

Share this post


Link to post

// Resolved the synchronization issue by resetting the ImageCollection of VirtualImageList1.
VirtualImageList1.ImageCollection := nil;
VirtualImageList1.ImageCollection := ImageCollection1;

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×