how to use TlogFont for fastreport TFRXmemoview

edited 1:59AM in FastReport 4.0
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;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:59AM
    when working with the design page you use the find object method this way
    Memos := frxReport1.FindObject('Memo2) as TfrxMemoView;
    access any property of the memoview here.
  • edited June 2009
    thanks gordk,


    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();


    gordk wrote: »
    when working with the design page you use the find object method this way
    Memos := frxReport1.FindObject('Memo2) as TfrxMemoView;
    access any property of the memoview here.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.