Treeview/Treeviewplus image and origin file with different resolution

aroom

Member
Licensed User
hi,
Question: photo add Treeview image, but image is not clear.
How to set Treeview/Treeviewplus image resolution?
thanks.
 

Attachments

  • treeviewtest.zip
    16.5 KB · Views: 204

agraham

Expert
Licensed User
Longtime User
By default TreeView images are only 8 bits per pixel which distorts photo-realistic images. On the desktop you can change this with the Door library as shown. Unfortunately on the device this is not possible so the code will not work there. Obj1 is a Door library object.
B4X:
tree.ImageSize(64,64)
tree.ImageMode = True
' must be after setting ImageMode
Obj1.New1(False)
Obj1.Value = tree.ControlRef
Obj1.Value = Obj1.GetProperty("ImageList")
Obj1.SetProperty("ColorDepth", 24)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…