通过该方法你可以随心所欲地在memo或richedit里作图了!呵呵!
function Tform1.memopain:boolean;
var
MyCanvas: TControlCanvas;
Begin
MyCanvas:=TControlCanvas.Create;
Mycanvas.control:=memo1;//想在memo1上作画
With Mycanvas do
Begin
//这里可以更改为你的作图程序
Brush.Color := clBtnFace;
MoveTo ( 33, 0 );
Brush.Color := clWhite;
LineTo ( 33, ClientHeight );
end;
End;
关键词:随心所欲地在memo或richedit里作图