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

  1. unit Candle_OpenClose;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, StdCtrls, ExtCtrls, TeEngine, Series, OHLChart, CandleCh, TeeProcs,
  8.   Chart;
  9.  
  10. type
  11.   TCandleOpenClose = class(TBaseForm)
  12.     Series1: TCandleSeries;
  13.     RadioGroup1: TRadioGroup;
  14.     CheckBox1: TCheckBox;
  15.     procedure FormCreate(Sender: TObject);
  16.     procedure RadioGroup1Click(Sender: TObject);
  17.     procedure CheckBox1Click(Sender: TObject);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27.  
  28. procedure TCandleOpenClose.FormCreate(Sender: TObject);
  29. begin
  30.   inherited;
  31.   Series1.FillSampleValues(20);
  32.   Series1.CandleStyle:=csOpenClose;
  33. end;
  34.  
  35. procedure TCandleOpenClose.RadioGroup1Click(Sender: TObject);
  36. begin
  37.   Case RadioGroup1.ItemIndex of
  38.     0: Series1.CandleStyle:=csCandleStick;
  39.     1: Series1.CandleStyle:=csCandleBar;
  40.     2: Series1.CandleStyle:=csOpenClose;
  41.   end;
  42. end;
  43.  
  44. procedure TCandleOpenClose.CheckBox1Click(Sender: TObject);
  45. begin
  46.   Series1.Pointer.Draw3D:=CheckBox1.Checked;
  47. end;
  48.  
  49. initialization
  50.   RegisterClass(TCandleOpenClose);
  51. end.
  52.