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

  1. unit Series_Depth;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, StdCtrls, ComCtrls, Series, TeEngine, ExtCtrls, TeeProcs, Chart,
  8.   TeeComma;
  9.  
  10. type
  11.   TSeriesDepth = class(TBaseForm)
  12.     Series1: TLineSeries;
  13.     Series2: TBarSeries;
  14.     Series3: TLineSeries;
  15.     Label2: TLabel;
  16.     Edit1: TEdit;
  17.     UpDown1: TUpDown;
  18.     CheckBox1: TCheckBox;
  19.     TeeCommander1: TTeeCommander;
  20.     procedure CheckBox1Click(Sender: TObject);
  21.     procedure Edit1Change(Sender: TObject);
  22.     procedure FormCreate(Sender: TObject);
  23.   private
  24.     { Private declarations }
  25.   public
  26.     { Public declarations }
  27.   end;
  28.  
  29. implementation
  30.  
  31. {$R *.DFM}
  32.  
  33. procedure TSeriesDepth.CheckBox1Click(Sender: TObject);
  34. var tmp: Integer;
  35. begin
  36.   if CheckBox1.Checked then tmp:=-1
  37.                        else tmp:=UpDown1.Position;
  38.   Series1.Depth:=tmp;
  39.   Series2.Depth:=tmp;
  40.   Series3.Depth:=tmp;
  41. end;
  42.  
  43. procedure TSeriesDepth.Edit1Change(Sender: TObject);
  44. begin
  45.   CheckBox1.Checked:=False;
  46.   Series1.Depth:=UpDown1.Position;
  47.   Series2.Depth:=UpDown1.Position;
  48.   Series3.Depth:=UpDown1.Position;
  49. end;
  50.  
  51. procedure TSeriesDepth.FormCreate(Sender: TObject);
  52. begin
  53.   inherited;
  54.   Series1.FillSampleValues(10);
  55.   Series2.FillSampleValues(6);
  56.   Series3.FillSampleValues(10);
  57. end;
  58.  
  59. initialization
  60.   RegisterClass(TSeriesDepth);
  61. end.
  62.