How to view imege from ImageList in THtmlPort component. lazarus / 31-LCL ---------------------------------------------------------------------- toplek · 2015-08-16 11:12 Hi, do you have an idea how to display image in THtmlPort component using bitmap from ImageList ? br Piotr Polok ---------------------------------------------------------------------- Blaazen · 2015-08-16 14:05 I don't know anything about THtmlPort but basically you can do this to display image from ImageList to TImage: Code: [Select]procedure TForm1.Button1Click(Sender: TObject); var aBMP: TBitmap; begin aBMP:=TBitmap.Create; ImageList1.GetBitmap(1, aBMP); Image1.Canvas.Draw(20, 20, aBMP); aBMP.Free; end; or even simplier Code: [Select]procedure TForm1.Button2Click(Sender: TObject); begin ImageList1.GetBitmap(1, Image1.Picture.Bitmap); end; Note: 1 is index of image in list. ---------------------------------------------------------------------- taazz · 2015-08-16 16:43 Quote from: toplek on August 16, 2015, 01:12:26 pmHi, do you have an idea how to display image in THtmlPort component using bitmap from ImageList ? br Piotr Polok you have to create an html string with the correct image tags and load it in htmlport there is an event you can write that is fired for every image and in there you load your images and return them as needed. For more info either look the events in the object inspector or post again in this thread and I'll try to create a sample to get you started. ---------------------------------------------------------------------- toplek · 2015-08-22 06:33 Hi, thank you for the answer, the THtmlPort port component is and old version of ThtmlViewer component. The benefit of THtmlPort is that this version is working on Lazarus in Linux platform. I was trying the html code: Code: [Select]
| TEST #1 | TEST #2 | TEST #3 |