![]() |
|
#1
|
|||
|
|||
|
anybody help me
can u share the code ex: i have image c:/photo folder inside the photo folde have cofee image candy image now listbox1 inside the listbox1 have cofee candy now if i click the cofee inside in the list box show the image came from c:/photo now show in image1 thanks who help me |
|
#2
|
|||
|
|||
|
you want us to write the entire piece of code?
Why not have a go at it yourself and if you run into problems then ask for help? You wont learn anything if you are just given the answer... |
|
#3
|
|||
|
|||
|
here my error vod
var bfast1:string; begin bfast1:=(ListBox1.Items[ListBox1.ItemIndex]); if (bfast1='day2') then Image1.Picture.LoadFromFile('C:\drinks\soda/coke.png'); = ok Image2.Picture.LoadFromFile('C:\cake\Thumbs/ube.jpg');=ok Image3.Picture.LoadFromFile('C:\rttr\rt54/juices.png'); =ok if (bfast1='day1') then Image1.Picture.LoadFromFile('C:\drinks\soda/coke1.png');=ok Image2.Picture.LoadFromFile('C:\cake\Thumbs/ube2.jpg');= error nothing change Image3.Picture.LoadFromFile('C:\rttr\rt54/juices3.png');= erorr nothing change end; |
|
#4
|
|||
|
|||
|
try repainting the images one they are loaded?
Image2.repaint Or add in Application.processmessages after each load |
|
#5
|
|||
|
|||
|
Dear friend,
TListBox, can store "Strings" or "Object" - see the help your delphi Point 1: Why you dont use one database (or table) for store your images? Ex.: Table_my_Images_for_ListBox fields: ID, Description, Path, BLOB(Image) So, you can to use 1 DBlistbox. Clear, always check the path and file for your existence in disk, if needed! Using one database (FIREBIRD, INterBase, etc...) you can store the images, so, take easy for your software!
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|