2

I am working on win form application using C#. I came across a scenario where i need to provide a ComboBox to user. Now in order to make look and feel more appealing, i want to display a small image or icon before each item of that combo box.

I look across some third party controls providing this functionality, but i want to use the default combo box control of visual sutdio. How do i add image by using the default ComboBox control?

Jame
  • 21,150
  • 37
  • 80
  • 107
  • AFAIK this is not directly possible with the combobox control you will have roll in your custom combobox for this – V4Vendetta Apr 27 '11 at 12:06
  • 3
    Check this thread: http://stackoverflow.com/questions/1232861/combo-box-with-icons-in-windows-forms – k.m Apr 27 '11 at 12:09

1 Answers1

3

Not possible with the default combo box control from Windows Forms. You need a custom solution with an owner draw combo. See an example here.

Marius Bancila
  • 16,053
  • 9
  • 49
  • 91
  • This is better as a comment rather than answer – V4Vendetta Apr 27 '11 at 12:15
  • He doesn't have high enough reputation to add comments. – John Arlen Apr 27 '11 at 20:38
  • 3
    I can add comments, that's all right. But what I find funny about SO is the concern people have on the form of the answer, rather than the value of the answer. Like whether it's a comment or an answer, or whether it's a link or just restating everything you can find by following that link. Awesome! – Marius Bancila Apr 27 '11 at 20:48