李 李捷 Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-19 #1 我在TDBChart中显示了一条基于数据库的曲线,想用Canvas对曲线进行标记, 但Canvas不能直接在TDBChart上画图,应该怎么弄?请哪位详细告诉我,谢谢! 如果有比我更好的方法最好。
I Iknow Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-21 #3 可以用DBChart1.canvas.canvas来画, 或者在DBChart1.onCanvasChanged事件里画.
李 李捷 Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-21 #4 不行。TDBChart组件没有Canvas属性,问题是怎么将Canvas属性添加到TDBChart中去。
Q qf0421 Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-05 #7 canvas:TCanvas begin canvas:=TCanvas.Create; TControl(Canvas).control:=DBChart1; end; //////////////////////////////////////////////// 即可
canvas:TCanvas begin canvas:=TCanvas.Create; TControl(Canvas).control:=DBChart1; end; //////////////////////////////////////////////// 即可
A Another_eYes Unregistered / Unconfirmed GUEST, unregistred user! 2000-09-19 #8 var Canvas: TCanvas; begin Canvas := TCanvas.Create; Canvas.handle := GetDC(DBChart1.Handle); with Canvas do begin ....... // 随便你怎么画 end; ReleaseDC(DBChart1.Handle, Canvas.handle); Canvas.Handle := 0; Canvas.Free; end;
var Canvas: TCanvas; begin Canvas := TCanvas.Create; Canvas.handle := GetDC(DBChart1.Handle); with Canvas do begin ....... // 随便你怎么画 end; ReleaseDC(DBChart1.Handle, Canvas.handle); Canvas.Handle := 0; Canvas.Free; end;