Originally Posted by alee
Hi,
I want to add images to combo box. I have set the text for the items using it "items" property and setting "TString" in it. I read somewhere that i can add images to these items, appending to TString .. but i am unable to get it .. can some one guide me how can i add images to combobox??
If you are talking about storing an image as oppose to displaying an image
then you need to use the TStrings addObject method instead of the Add method.
If you are talking about displaying an image, I think you will have to take over responsibility
for the entire drawing process. I think you need the onDrawItem event.
You might want to look for a third party (free?) component that has that feature built in.
I am fairly sure there are some free ones that will do that.
There are definitely commercial ones that do.
Clive |