Frequently Asked Component Specific Questions
Options |
|
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

THotSpotImageHow to use the hotspot design-time editor at run-time.
You can easily use the hotspot design-time editor at run-time to allow users to edit hotspot run-time. To allow this, use following steps :
1. Add HotSpotEditor in the Uses list of the unit from where you want to use this
2. Following code shows the hotspot editor (supposing there is a HotSpotImag1 component on the form you wish to edit at run-time):
uses
HotSpotEditor;
procedure TForm1.Button1Click(Sender: TObject);
var
frmEditor: TfrmHSIEditor;
begin
FHotSpots.Assign(HotSpotImage1.HotSpots);
FPicture.Assign(HotSpotImage1.Picture);
frmEditor := TfrmHSIEditor.Create(nil);
try
if frmEditor.ShowModal = mrOK then
begin
HotSpotImage1.HotSpots.Assign(FHotSpots);
HotSpotImage1.Picture.Assign(FPicture);
end;
finally
frmEditor.Free;
frmEditor := nil;
end;
end;