Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TMS Smooth Controls Pack
Adding pictures to the TGDIPPictureContainer at runtime
Adding pictures to the TGDIPPictureContainer at runtime
It is equally possible to add pictures to the TGDIPPictureContainer at run-time. Below is a code snippet that shows how an image is loaded from file and added to the TGDIPPictureContainer and subsequently used for display in a TAdvSmoothListBox control:
with GDIPPictureContainer.Items.Add do begin Picture.LoadFromFile('myimage.png’); Name := 'NEW'; end; AdvSmoothListBox.Items.Add.Caption := 'This uses the new image : ';
with GDIPPictureContainer.Items.Items[0].Free;
This is also explained at page 14 of the PDF Developers Guide.