Answer the question
In order to leave comments, you need to log in
DevExpress TreeList + ImageList, how to quickly insert a picture?
Good afternoon.
There is this code:
dynamic Get = JsonConvert.DeserializeObject(cpapi.GCP_Items());
for (int i = 0; i < Get.Count; i++)
{
Invoke((Action)(() => ItemList.Nodes.Add(Get[i].Name.Value, Get[i].count.Value, ToTime(Get[i].time.Value), Get[i].price.Value)));
ItemList.Nodes[i].Tag = Get[i].UniqID.Value.ToString();
PictureBox box = new PictureBox();
box.Size = new Size(32, 32);
box.LoadAsync(Get[i]["image_url"].Value.ToString());
ItemsImages.Images.Add(box.Image);
Invoke((Action)(() => ItemList.Nodes[i].StateImageIndex = i));
}
Answer the question
In order to leave comments, you need to log in
It seems to have decided. By bicycle way. Download via WebClient and substitute via Image.FromFile
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question