[Android]TIdHTTP and ListBox

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

[Android]TIdHTTP and ListBox

Postby Lena » Tue Dec 06, 2016 7:50 am

Hi.
How to add pictures to a ListBox from a remote host?
Is it necessary to use TIdHTTP cycle download image to a temporary file and then:
Item->ItemData->Bitmap->LoadFromFile (temporary file)
?
Lena
BCBJ Master
BCBJ Master
 
Posts: 429
Joined: Sun Feb 06, 2011 1:28 pm

Re: [Android]TIdHTTP and ListBox

Postby rlebeau » Tue Dec 06, 2016 1:37 pm

Lena wrote:Is it necessary to use TIdHTTP cycle download image to a temporary file and then:
Item->ItemData->Bitmap->LoadFromFile (temporary file)
?


Yes, you need to download the image first. You can skip the temporary file, though. Have TIdHTTP download to a TStream instead of a file, and then you can use Bitmap.LoadFromStream().
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1387
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA


Return to Technical

Who is online

Users browsing this forum: No registered users and 4 guests