또한 줌(Zoom) 기능이 있고요.
행간격을 조절할 수 도 있습니다.
uses Richedit; 가 필요 합니다.
procedure TForm1.ZQuery1AfterScroll(DataSet: TDataSet);
var iText: string;
ms: TMemoryStream;
iStrings: Tstrings;
Para: TParaFormat2;
begin
ms:= TMemoryStream.Create;
iStrings:= TstringList.Create;
try
iStrings.Text:= ZQuery1.FieldByName('icontent').AsString;
iStrings.SaveToStream(ms);
ms.Position:= 0;
RichEdit1.Lines.LoadFromStream(ms);
finally
ms.Free;
iStrings.Free;
end;
RichEdit1.SelectAll;
Para.cbSize:= SizeOf(Para);
Para.dwMask:= PFM_LINESPACING;
// Para.bLineSpacingRule:= 4;
Para.dyLineSpacing:= 120;
SendMessage(RichEdit1.Handle, EM_SETPARAFORMAT, 0, LPARAM(@Para));
RichEdit1.SelStart:= 0;
RichEdit1.SelLength:= 0;
RichEdit1.Zoom:= 150;