Skip to main content
Table of Contents

Getting Started with TMS FNC Hot Spot Image

Use TTMSFNCHotSpotImage when an image needs selectable or hoverable regions with their own appearance and names.

Create Hot Spots

  1. Drop TTMSFNCHotSpotImage on the form.
  2. Assign the base image through the inherited image properties.
  3. Add rectangle, ellipse, path, or polygon hot spots.
  4. Handle selected or hovered hot spot events when the application should react to a region.
Create Hot SpotsPascalC++
var
  hs: TTMSFNCHotSpot;
begin
  TMSFNCHotSpotImage1.HotSpots.Clear;

  hs := TMSFNCHotSpotImage1.AddRectangleHotSpot(RectF(40, 40, 180, 120), 'Header');
  hs.Selectable := True;
  hs.ShowOnHover := True;
  hs.ShowHoverName := True;

  TMSFNCHotSpotImage1.SelectedHotSpot := TMSFNCHotSpotImage1.GetHotSpotIndexByName('Header');
end;
TTMSFNCHotSpot *hs;

TMSFNCHotSpotImage1->HotSpots->Clear();

hs = TMSFNCHotSpotImage1->AddRectangleHotSpot(RectF(40, 40, 180, 120), "Header");
hs->Selectable = true;
hs->ShowOnHover = true;
hs->ShowHoverName = true;

TMSFNCHotSpotImage1->SelectedHotSpot = TMSFNCHotSpotImage1->GetHotSpotIndexByName("Header");

Open the Editor

Use TTMSFNCHotSpotImageEditor to edit hot spots at runtime.

Open the EditorPascalC++
var
  Editor: TTMSFNCHotSpotImageEditor;
begin
  Editor := TTMSFNCHotSpotImageEditor.Create(Self);
  try
    Editor.HotSpotImage := TMSFNCHotSpotImage1;
    Editor.Execute;
  finally
    Editor.Free;
  end;
end;
TTMSFNCHotSpotImageEditor *Editor;

Editor = new TTMSFNCHotSpotImageEditor(this);
try
{
  Editor->HotSpotImage = TMSFNCHotSpotImage1;
  Editor->Execute();
}
__finally
{
  delete Editor;
}

Next Steps

Task Guide
Add hot spots and configure selection behavior Hot spots and editor
Open the runtime editor Hot spots and editor