Declaration
;procedure SetProperties(Props: TStrings); overload;
procedure SetProperties(PropName, Value: String); overload;
Description
Sets properties of the layer using a list of Name=Value pairs.
Names will be drawn from the
TIELayer Property Constants. Properties can be retrieved using
GetProperties.
Note: For all colors properties, e.g. IELP_FillColor, IELP_FillColor2, IELP_BorderColor, IELP_LineColor, IELP_FontColor, IELP_LabelColor, you can specify -1 for a random color, or -2 for a random pastel color
Sample Input
IELP_BorderColor=clNone
IELP_BorderWidth=0
IELP_FillColor=clYellow
IELP_FillColor2=clRed
IELP_FillGradient=1
IELP_Rotate=0
// Set properties of the current using a file
ss := TStringList.create();
ss.LoadFromFile( 'D:\CurrentLayer.txt' );
ImageEnView1.CurrentLayer.SetProperties( ss );
ImageEnView1.Update();
ss.Free();
// Apply a thick green border to all selected layers
ss := TStringList.create();
ss.Add( IELP_BorderColor + '=clGreen' );
ss.Add( IELP_BorderWidth + '=10' );
for i := 0 to ImageEnView1.LayersCount - 1 do
if ImageEnView1.Layers[ I ].Selected then
ImageEnView1.Layers[ I ].SetProperties( ss );
ImageEnView1.Update();
ss.Free();
See Also
◼GetProperties◼LayerDefaults◼LayersSetProperties