想改变memo每行字体的大小,颜色!
有什么好办法?

解决方案 »

  1.   

    memo.font.size :=xx;
    memo.font.color:=xx;
      

  2.   

    好像不能,你最好使用richedit,很容易改变每行字体的大小和颜色
      

  3.   

    memo不能实现楼主的功能,
    得用RICHEDIT来实现例程:procedure TForm1.Button1Click(Sender: TObject);begin
      with RichEdit1.SelAttributes do
      begin
        Color := clRed;
        Height := Height + 5;
      end;
      RichEdit1.Lines.Add('This line of text will be red.');
    end;procedure TForm1.Button2Click(Sender: TObject);
    begin
      RichEdit1.DefAttributes.Color := clBlue;
      RichEdit1.DefAttributes.Style := [fsBold, fsItalic];
    end;