简体   繁体   中英

How to display the image beside listbox items?

I have a ListBox displaying machine names. I want to display image icons beside each item in the ListBox , ie play the image beside a machine which is connected and stop the image beside the machine which is not connected.

You should use ListView instead of ListBox control. It supports multiple types of columns and images as well.

Have a look at the following tutorials that will guide through the way to accomplish what you exactly need:

  1. A CodeProject Article
  2. An answer on StackOverFlow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM