Recent

Author Topic: [Solved] TImageList/tListView  (Read 1984 times)

JasonLugg

  • Jr. Member
  • **
  • Posts: 67
[Solved] TImageList/tListView
« on: September 23, 2017, 10:25:34 pm »
Hi All

Tnx in advance!

I am coding a little sprite editor. I want to add each Sprite to an imagelist with the idea that these images will then be displayed in a listview.

So how to
1) Add Bmp to ImageList at run time
2) Have all the sprites in ImageList to be display in Listview ( as they are added to ImageList)

Just cannot seem to get it working?


« Last Edit: September 23, 2017, 11:28:45 pm by JasonLugg »

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: TImageList/tListView
« Reply #1 on: September 23, 2017, 11:15:22 pm »
See attached demo. It supports multiple selection of files in the file dialog, as well as drag and drop from the explorer.

1) Add Bmp to ImageList at run time
Don't use bmp, use png. Transparency can be handled easily with png.

2) Have all the sprites in ImageList to be display in Listview ( as they are added to ImageList)
Just in case you don't know:
In an ImageList, all images must have the same size. An interesting alternative is Theo's Thumbview: http://www.theo.ch/lazarus/thumbview.zip.

JasonLugg

  • Jr. Member
  • **
  • Posts: 67
Re: [Solved] TImageList/tListView
« Reply #2 on: September 23, 2017, 11:29:15 pm »
wp

Thank you so much!

Clear, Concise. Answered!

 

TinyPortal © 2005-2018