norgepaul / TChromeTabs

Comprehensive Delphi implementation of Chrome's tab system
Other
215 stars 78 forks source link

Suggestion - Allow setting ImageList for each TChromeTab #54

Closed edwinyzh closed 5 years ago

edwinyzh commented 7 years ago

It'll be very flexible, if it's possible to set both the ImageList and ImageIndex for each tab (TChromeTab)

djjd47130 commented 7 years ago

I cannot think of a single component or control in Delphi (built-in or third-party) which has such a feature. It kinda defeats the purpose of the image lists. What happens when two of these lists have different sizes? Do you really want one tab's image to be much larger than the next?

edwinyzh commented 4 years ago

I cannot think of a single component or control in Delphi (built-in or third-party) which has such a feature. It kinda defeats the purpose of the image lists. What happens when two of these lists have different sizes? Do you really want one tab's image to be much larger than the next?

Virtual Treeview has a OnGetImageEx event which allows specifying both the ImageList and ImageIndex values, and it's very helpful.

One of the use case for such a feature for TChromeTabs, for example, you have tabs that represents files or folders on the disk, and you have other tabs that are not files. For 'file tabs' you might want to show the icons of the file system, represented by a standalone TImageList retrieved using SHGetFileInfo, for other non-file tabs, you might want to show icons from another TImageList instance.

You won't be able to achieve the above if you cannot use two separated TImageList