Getting started with TMS FNC Bitmap Container
Prerequisites
- TMS FNC Core installed and the runtime package added to the project.
Add the component
- Drop
TTMSFNCBitmapContainerfrom the TMS FNC UI palette page onto a form or data module. - Open the Items collection editor.
- Add items, set
Nameto a unique string, and assign a bitmap toBitmap.
Connect to a control
Assign the container to any FNC control that has a BitmapContainer property, for example TTMSFNCPopupMenu:
PopupMenu1.BitmapContainer := BitmapContainer1;
PopupMenu1->BitmapContainer = BitmapContainer1;
The control's items then reference images by name:
PopupMenu1.Items[0].BitmapName := 'folder';
PopupMenu1.Items[1].BitmapName := 'folder-open';
PopupMenu1->Items->Items[0]->BitmapName = "folder";
PopupMenu1->Items->Items[1]->BitmapName = "folder-open";
Load images at runtime
var
Item: TTMSFNCBitmapItem;
begin
Item := BitmapContainer1.Items.Add;
Item.Name := 'logo';
Item.Bitmap.LoadFromFile('logo.png');
end;
TTMSFNCBitmapItem *Item = BitmapContainer1->Items->Add();
Item->Name = "logo";
Item->Bitmap->LoadFromFile("logo.png");
Next steps
- Guides — URL downloading, SVG bitmaps, DPI scaling.
- API reference — full class reference.