I'm trying to add images into a combobox instead of text. Someone recommended I use the TComboBoxEx instead of TComboBox, but how does it work?
I found a tutorial, but it's confusing and I do not understand. Does it work different than normal ComboBox? https://docwiki.embarcadero.com/CodeExamples/Alexandria/en/TComboBoxEx_(Delphi)
With TComboBox, there's a TStrings Items property that I can use to change the text.
I do not see a Items property for TComboBoxEx.
How can I have images for a dropdown instead of Text?
You can use the
ItemsExproperty to add text and images. Double clicking onItemsExopens this window:From there with the top-left button, you can add dropdown items and then you'll see a
CaptionandImageIndexfor each item:The images are populated through a
TImageListcomponent that you have to drop onto the form as well and then there's anImagesproperty on theTComboBoxExthat you have to set equal to theTImageListAnd that's it. Then you have your ComboBox with images: