Skip to main content
Table of Contents

Getting started with TMS FNC Bitmap Container

Prerequisites

  • TMS FNC Core installed and the runtime package added to the project.

Add the component

  1. Drop TTMSFNCBitmapContainer from the TMS FNC UI palette page onto a form or data module.
  2. Open the Items collection editor.
  3. Add items, set Name to a unique string, and assign a bitmap to Bitmap.

Connect to a control

Assign the container to any FNC control that has a BitmapContainer property, for example TTMSFNCPopupMenu:

Connect to a controlPascalC++
PopupMenu1.BitmapContainer := BitmapContainer1;
PopupMenu1->BitmapContainer = BitmapContainer1;

The control's items then reference images by name:

Connect to a controlPascalC++
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

Load images at runtimePascalC++
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.