info

info

  • NA
  • 13
  • 0

Listview and Images from a database , not visible :s

Nov 4 2004 4:19 PM
Hi, I am trying to add images to a Listview but they are not visible... DB.Connect(); DB.Open (); DB.Execute_Sql_Read ("Select * from C"); company.View = View.Details; company.SmallImageList =imglist; company.Columns.Add("C", 100, HorizontalAlignment.Left); company.Columns.Add("E", 100, HorizontalAlignment.Left); company.Columns.Add("W", 100, HorizontalAlignment.Left); company.Columns.Add("B", 100, HorizontalAlignment.Left); company.Columns.Add("H", 100,HorizontalAlignment.Left); company.Columns.Add("O", 100,HorizontalAlignment.Left); company.Columns.Add("",0,HorizontalAlignment.Left); ListViewItem lSingleItem; while (DB.Read_Next()) { imglist.Images.Add (Bitmap.FromFile (DB.Get_Data ("string",7))); lSingleItem = company.Items.Add(DB.Get_Data ("string",1)); lSingleItem.SubItems.Add(DB.Get_Data ("string",2)); lSingleItem.SubItems.Add(DB.Get_Data ("string",3)); lSingleItem.SubItems.Add(DB.Get_Data ("string",4)); lSingleItem.SubItems.Add(DB.Get_Data ("string",5)); lSingleItem.SubItems.Add(DB.Get_Data ("string",6)); lSingleItem.SubItems.Add(DB.Get_Data ("integer",0)); } DB.Close (); Anyone who know how I can make them visible? Thx

Answers (3)