Adding Bitmaps to TTMSFNCListBox Items

I'm using the TTMSFNCListBox instead of the TTMSFNCCloudDemoListBox (used in the TMSFNCCloudStorageServices Demo) because I need the MultiSelect property available in the TTMSFNCListBox. However, I cannot figure out how to add Folder and File bitmaps to the TTMSFNCListBox items as done by the following code in the TTMSFNCCloudDemoListBox procedure TForm4.FillListBox(AItems: TTMSFNCCloudItems; AAddFolders, AAddFiles: Boolean);:
if ((ci.ItemType = ciFolder) and AAddFolders) or ((ci.ItemType = ciFile) and AAddFiles) then
TMSFNCCloudDemoListBox1.AddItem(AItems.Items[I].Filename, ftype, ci);

Could you add a procedure to TTMSFNCListBox to enable the demo listbox FillListBox's AddItem functionality or, alternatively, advise how I could add Folder and File icons to the TTMSFNCListBox for my app's CloudStorage capability?


The code for TTMSFNCCloudDemoListBox is specific for the TMS FNC Cloud Pack. We can do this for TTMSFNCListBox, but as this requires quite significant amount of work, we can offer this via custom consulting services. Please contact us by direct email if you have interest in getting this worked out.

Thanks Pieter. However, from what you say, I don't think the effort and cost required is worth it just to provide bitmaps for my app's Cloud Services feature. It works fine with a TTMSFNCListBox - even without the bitmaps! Have a happy holiday.

Attached is a sample project that displays icons in TMSFNCListBox depending on the type of file or folder. The project is in Lazarus, but there should be no problem transferring it to Delphi. (15,4 KB)

1 Like

Thanks Pawel. That gave me a clue as to how the job could be done. Happy holidays.