比如:在设置时 Memo1的height属性值为:20,怎样动态将值改为40?
谢谢!

解决方案 »

  1.   

    Memo1.Height := 40; 不可以吗?没用过FastReport
      

  2.   

    你是想根据Memo1里数据的多少改变高度?
      

  3.   

    不知道你的是什么版本?
    我以前一直用2.34,今天用了3才真牛。
    如果是3的,那么在编辑状态下放一个ReportTitle,上面放个Memo,将color设置成clBlack,然后在此Memo的OnBeforeprint事件里面写TfrxMemoView(Sender).height :=100;
    就行了。
      

  4.   

    Memo1.height :=100;
    也行。
      

  5.   

    var
      t1:TfrMemoView;begin
      fastReport1.loadfromfile('test.frf');
     
      t1:=TfrMemoView(fastReport1.FindObject('Memo1'));
      if t1<>nil then t1.height:=20;  fastReport1.ShowReport;
    end;
      

  6.   

    如楼上所说。
    或者在OnBeforePrint里面也行。
    好像2.5的参数是Viewif View.name='Memo1' then
    TfrMemoView(View).height :=20;
      

  7.   

    不可以
    var
      t1:TfrMemoView;begin
      fastReport1.loadfromfile('test.frf');
     
      t1:=TfrMemoView(fastReport1.FindObject('Memo1'));
      if t1<>nil then t1.height:=20;  fastReport1.ShowReport;
    end;
    运行时提示:
    [Error] Unit1.pas(45): Undeclared identifier: 'height'