网上的代码,不太行 uses RichEdit; {$R *.dfm} procedure RE_SetLineSpacing(ARichEdit: TRichEdit; lineSpacing: Byte); var pf2: ParaFormat2; begin FillChar(pf2, SizeOf(pf2), 0); pf2.cbSize := SizeOf(ParaFormat2); pf2.dwMask := PFM_LINESPACING; pf2.bLineSpacingRule := lineSpacing; SendMessage(ARichEdit.Handle, EM_SETPARAFORMAT, 0, Longint(@pf2)); end; // Example: Setlinespacing to 1: procedure TForm1.Button1Click(Sender: TObject); begin RichEdit1.SelectAll; RE_SetLineSpacing(RichEdit1, strtoint(edit1.Text)); end;只能调整成0、1、2三个数字