bg5
2014-06-27 07:09:01
Hey,
I translated my old function from PS to Lape:
and got an error:
So TFontStyles is not an array of styles anymore, but a single element? How can you assign more then one style to the font?
I translated my old function from PS to Lape:
procedure MakeFont(FLabel,Name:string;Size:integer;Style :TFontStyles);
var f:Tfont;
begin
f.init();
f.setName(Name);
f.setSize(Size);
f.setStyle(Style);
LoadSystemFont(f,FLabel);
f.Free;
end;
begin
MakeFont('Space','Arial',18,[fsBold, fsItalic]);
end. and got an error:
Exception in Script: Expected variable of type "(fsBold=0, fsItalic=1, fsStrikeOut=2, fsUnderline=3)", got "set of (fsBold=0, fsItalic=1, fsStrikeOut=2, fsUnderline=3)" at line 16, column 11 at line 16, column 31So TFontStyles is not an array of styles anymore, but a single element? How can you assign more then one style to the font?