Devv Active Member Licensed User Longtime User Mar 5, 2015 #1 is it possible to get image list view bitmap ? ListView1.AddTwoLinesAndBitmap("Item #" & i, "This is the second line.", Bitmap1)
is it possible to get image list view bitmap ? ListView1.AddTwoLinesAndBitmap("Item #" & i, "This is the second line.", Bitmap1)
mangojack Expert Licensed User Longtime User Mar 5, 2015 #2 If I understand .. you want to get the image of the listview selected item. By using AddTwoLinesAndBitmap2 method you can store a return value for item clicks .. unfortunately I don't think you can directly store an image. You could use a Map to store the Listview items (including Image) and set this as the return object Then on ListView_Click you can by access the contents of the map retrieving the image ... See This Thread .. Upvote 0
If I understand .. you want to get the image of the listview selected item. By using AddTwoLinesAndBitmap2 method you can store a return value for item clicks .. unfortunately I don't think you can directly store an image. You could use a Map to store the Listview items (including Image) and set this as the return object Then on ListView_Click you can by access the contents of the map retrieving the image ... See This Thread ..
DonManfred Expert Licensed User Longtime User Mar 6, 2015 #3 mangojack said: unfortunately I don't think you can directly store an image. Click to expand... You can store an Object. Any object. You can store an bitmap too. ONLY a Bitmap. I suggest using a map into the returnvalue. With a Map (or list) you can store any amount of data or objects into one return-value B4X: Expand Collapse Copy Dim retmap As Map retmap.Initialize retmap.Put("id",1) retmap.Put("line1","this is line 1") retmap.Put("line2","this is line 2") retmap.Put("bitmap",bitmap1) [..] retmap.Put("othervalue","0815") lv.AddTwoLines2(cells(0),cells(1), retmap) Upvote 0
mangojack said: unfortunately I don't think you can directly store an image. Click to expand... You can store an Object. Any object. You can store an bitmap too. ONLY a Bitmap. I suggest using a map into the returnvalue. With a Map (or list) you can store any amount of data or objects into one return-value B4X: Expand Collapse Copy Dim retmap As Map retmap.Initialize retmap.Put("id",1) retmap.Put("line1","this is line 1") retmap.Put("line2","this is line 2") retmap.Put("bitmap",bitmap1) [..] retmap.Put("othervalue","0815") lv.AddTwoLines2(cells(0),cells(1), retmap)