I'm glad you don't feel unique names are important. I'm thinking of assigning my own names to several different layers and storing/restoring the defaults for those layers. Since they may be the same type of layer, but different purposes, I don't want the defaults to overwrite each other.
I have figured out how to use OnNewLayer to specify the image. And your drag and drop sample program gave me enough ideas to use an imagelist. But I'm not at all clear how to use OnNewLayer to set a default image folder?
procedure TfrmImagePopUp.ImageEnView1NewLayer(Sender: TObject;
LayerIdx: Integer; LayerKind: TIELayerKind);
var
MyDefaultBitMap : TBitMap;
begin
if (ImageEnView1.Layers[LayerIDX].Kind = ielkImage) and (InsertCheckBox1.Checked = true) then
begin
MyDefaultBitMap := TBitmap.Create;
MainForm.ImageList1.GetBitmap(0,MyDefaultBitMap);
TIEImageLayer(ImageEnView1.CurrentLayer).Bitmap.Assign(MyDefaultBitMap);
MyDefaultBitMap.Free;
end;
end;
J.R.