Hi I am using the treeview control in the controlsex lib, is there a way of removing and inserting images in the object, i.e if I add 5 images to the object and want to replace image 2 with a new image how do I do it?
Thanks,
Simon
With the Door library you can remove a specific image or clear all the images. It cannot however insert or replace an image so your best bet might be to clear the list and add the images back in the order you want. TV is a TreeView object.
B4X:
Obj1.New1(False)
Obj1.FromLibrary("Main.TV", "il", B4PObject(2)) ' get the ImageList
Obj1.Value = Obj1.GetProperty("Images") ' get the ImageCollection
Count = Obj1.GetProperty("Count") ' number of images in list
Index = 0
Obj1.RunMethod2("RemoveAt", index, "System.Int32") ' remove an image
Obj1.RunMethod("Clear") ' remove all images