在TEECHART中如何用TEXTOUT输出自己的文字?(有短程序) (50分)

  • 主题发起人 主题发起人 懒少爷
  • 开始时间 开始时间

懒少爷

Unregistered / Unconfirmed
GUEST, unregistred user!
请看如下程序,他什么都没有做
..........[:(]
implementation
{$R *.DFM}
procedure TForm1.Chart1Enter(Sender: TObject);
begin
chart1.Canvas.Font.Size:=20;
chart1.Canvas.Font.Color:=clRed;
chart1.Canvas.TextOut(100,50,'TEST text out');
end;

end.
 

DBChart1.LeftAxis.DrawAxisLabel(xx, yy, 0, '靶值:' + formatfloat('#.000', v) + ' ');

 
自己搞定!!
@#$!#@#的,斑竹太烂了!

procedure TFormRipOff.Chart1AfterDraw(Sender: TObject);
var
TopPos,LeftPos,BottomPos,RightPos,spaceLen:longInt;
begin
TopPos:=Chart1.ChartRect.Top;
LeftPos:=Chart1.ChartRect.Left;
BottomPos:=Chart1.ChartRect.Bottom;
RightPos:=Chart1.ChartRect.Right;
spaceLen:=(rightPos-LeftPos)div 4;
Chart1.Canvas.Font.Color :=clBlack;
Chart1.Canvas.Font.Style :=[] ;
Chart1.Canvas.Font.Height :=14;
Chart1.Canvas.TextOut(RightPos-60,TopPos-25,'No:______');
Chart1.Canvas.TextOut(LeftPos+10,BottomPos+20,'Prepared by:'+trim(DataM.QueryModelHeadOperator.value));
Chart1.Canvas.TextOut(LeftPos+2*spaceLen-30,BottomPos+20,'Approved by:_______');
Chart1.Canvas.TextOut(LeftPos+spaceLen-10,BottomPos+20,'Date:'+trim(DateToStr(DataM.QueryModelHeadDate.Value)));
Chart1.Canvas.TextOut(LeftPos+3*spaceLen,BottomPos+20,'Result:____');
end;
 
接受答案了.
 
后退
顶部