home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / TeeChartPro / TeeChart5Delphi5Eval.exe / %MAINDIR% / Examples / Features / Series_Shape.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-09-10  |  1.3 KB  |  51 lines

  1. unit Series_Shape;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, TeEngine, TeeShape, ExtCtrls, TeeProcs, Chart, StdCtrls;
  8.  
  9. type
  10.   TShapeSeriesForm = class(TBaseForm)
  11.     Series1: TChartShape;
  12.     Series2: TChartShape;
  13.     Series3: TChartShape;
  14.     Series4: TChartShape;
  15.     Series5: TChartShape;
  16.     CheckBox1: TCheckBox;
  17.     procedure Series1Click(Sender: TChartSeries; ValueIndex: Integer;
  18.       Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  19.     procedure CheckBox1Click(Sender: TObject);
  20.   private
  21.     { Private declarations }
  22.   public
  23.     { Public declarations }
  24.   end;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. Uses EditChar;
  31.  
  32. procedure TShapeSeriesForm.Series1Click(Sender: TChartSeries;
  33.   ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X,
  34.   Y: Integer);
  35. begin
  36.   EditSeries(Self,Sender); { when a shape is clicked... }
  37.   Chart1.CancelMouse:=True; { stop mouse zooming }
  38. end;
  39.  
  40. procedure TShapeSeriesForm.CheckBox1Click(Sender: TObject);
  41. var t:Integer;
  42. begin
  43.   for t:=0 to Chart1.SeriesCount-1 do
  44.       if Chart1[t] is TChartShape then
  45.          TChartShape(Chart1[t]).Transparent:=CheckBox1.Checked
  46. end;
  47.  
  48. initialization
  49.   RegisterClass(TShapeSeriesForm);
  50. end.
  51.