how to put bmp images in listview or listbox

  • Thread starter Thread starter Kanaiya
  • Start date Start date
Hi,

IIRC you cannot put images on a listbox, a Listbox has a collection of
instance of the class object, so all it does to show it is call
object.ToString();

Using a ListView you can have images, take a look at
ListView.LargeImageList and ListView.SmallImageList , basically they are
strong typed collection of Image objects , they are visible when the
ListView.View is either LargeIcon or SmallIcon .

Hope this help,
 
By changing the DrawMode property to DrawMode.OwnerDrawFixed or
DrawMode.OwnerDrawVariable and providing a handler for the DrawItem event,
you should be able to get the results you are after for the ListBox.


HTH
Brian W
 
Back
Top