how to use TlogFont for fastreport TFRXmemoview
dear all
how to use TlogFont for fastreport TFRXmemoview?
see,i try this ,but nothing works, please give me a helo ,thanks
procedure TForm1.btn6Click(Sender: TObject);
var
lf: TLogFont;
myF_Page: TfrxReportPage;
memos: TfrxMemoView;
paths: string;
begin
paths := ExtractFilePath(Application.ExeName) + '090628_2.fr3';
frxReport1.LoadFromFile(paths);
myF_Page := TfrxReportPage(frxReport1.Pages[1]);
memos := myF_Page.FindObject('Memo2') as TfrxMemoView;
if (memos <> nil) then
begin // showMessage('good');
showMessage(memos.Text);
GetObject(memos.Font.Handle, SizeOf(TLogfont), @lf);
lf.lfWidth := 5;
lf.lfEscapement := 450;
lf.lfOrientation := 450;
memos.Font.Handle := CreateFontIndirect(lf);
frxReport1.PrepareReport;
frxReport1.ShowReport();
end
end;
how to use TlogFont for fastreport TFRXmemoview?
see,i try this ,but nothing works, please give me a helo ,thanks
procedure TForm1.btn6Click(Sender: TObject);
var
lf: TLogFont;
myF_Page: TfrxReportPage;
memos: TfrxMemoView;
paths: string;
begin
paths := ExtractFilePath(Application.ExeName) + '090628_2.fr3';
frxReport1.LoadFromFile(paths);
myF_Page := TfrxReportPage(frxReport1.Pages[1]);
memos := myF_Page.FindObject('Memo2') as TfrxMemoView;
if (memos <> nil) then
begin // showMessage('good');
showMessage(memos.Text);
GetObject(memos.Font.Handle, SizeOf(TLogfont), @lf);
lf.lfWidth := 5;
lf.lfEscapement := 450;
lf.lfOrientation := 450;
memos.Font.Handle := CreateFontIndirect(lf);
frxReport1.PrepareReport;
frxReport1.ShowReport();
end
end;
Comments
Memos := frxReport1.FindObject('Memo2) as TfrxMemoView;
access any property of the memoview here.
i tryed your advice ,but i still not work.
ps:
i try this
GetObject(memos.Font.Handle, SizeOf(TLogfont), @lf);
lf.lfWidth := 5;
lf.font.name:='Arial Black';
//i add this one ,and in Report preview ,Memo2 's font is Arial Black ,not like Arial before .
//but the Memo width did not change and did not rotation
lf.lfEscapement := 450;
lf.lfOrientation := 450;
memos.Font.Handle := CreateFontIndirect(lf);
frxReport1.PrepareReport;
frxReport1.ShowReport();