memo1.Font.Color :=clred;
memo1.Font.Name:='宋体';
memo1.Font.Size:=15;
memo1.Font.Style:=[fsBold,fsItalic,fsUnderline,fsStrikeOut]; //减少里面的元素得到你所需要的效果
memo1.Font.Name:='宋体';
memo1.Font.Size:=15;
memo1.Font.Style:=[fsBold,fsItalic,fsUnderline,fsStrikeOut]; //减少里面的元素得到你所需要的效果
memo1.Alignment := taCenter; //居中
memo1.Alignment := taLeftJustify; //左边
memo1.Alignment := taRightJustify;//右边
rewrite//读写
reset//只读
writeln//写进一行fileclose
{
Memo1.Lines.Clear;
}procedure Tform1.SaveAs1Click(Sender:TObject)
{
if SaveDialog1.Execute then
Memo1.Lines.SaveToFile(SaveDialog1.FileName);
}procedure Tform1.Open1Click(Sender:TObject)
{
if OpenDialog1.Execute then
Memo1.Lines.SaveToFile(OpenDialog1.FileName);
}
procedure Tform1.Open1Click(Sender:TObject)
{
if OpenDialog1.Execute then
Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
}