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

  1. unit Brush_Styles;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, StdCtrls, Buttons, TeEngine, Series, ExtCtrls, TeeProcs, Chart;
  8.  
  9. type
  10.   TBrushStyleForm = class(TBaseForm)
  11.     Series1: TBarSeries;
  12.     SpeedButton1: TSpeedButton;
  13.     SpeedButton2: TSpeedButton;
  14.     SpeedButton3: TSpeedButton;
  15.     SpeedButton4: TSpeedButton;
  16.     SpeedButton5: TSpeedButton;
  17.     SpeedButton6: TSpeedButton;
  18.     SpeedButton7: TSpeedButton;
  19.     SpeedButton8: TSpeedButton;
  20.     Button1: TButton;
  21.     SpeedButton9: TSpeedButton;
  22.     SpeedButton10: TSpeedButton;
  23.     SpeedButton11: TSpeedButton;
  24.     SpeedButton12: TSpeedButton;
  25.     procedure FormCreate(Sender: TObject);
  26.     procedure SpeedButton1Click(Sender: TObject);
  27.     procedure Button1Click(Sender: TObject);
  28.   private
  29.     { Private declarations }
  30.   public
  31.     { Public declarations }
  32.   end;
  33.  
  34. implementation
  35.  
  36. {$R *.dfm}
  37.  
  38. Uses TeeBrushDlg;
  39.  
  40. procedure TBrushStyleForm.FormCreate(Sender: TObject);
  41. begin
  42.   inherited;
  43.   Series1.FillSampleValues(8);
  44.  
  45.   GetTeeBrush(0,SpeedButton1.Glyph);
  46.   GetTeeBrush(1,SpeedButton2.Glyph);
  47.   GetTeeBrush(2,SpeedButton3.Glyph);
  48.   GetTeeBrush(3,SpeedButton4.Glyph);
  49.   GetTeeBrush(4,SpeedButton5.Glyph);
  50.   GetTeeBrush(5,SpeedButton6.Glyph);
  51.   GetTeeBrush(6,SpeedButton7.Glyph);
  52.   GetTeeBrush(7,SpeedButton8.Glyph);
  53.   GetTeeBrush(8,SpeedButton9.Glyph);
  54.   GetTeeBrush(9,SpeedButton10.Glyph);
  55.   GetTeeBrush(10,SpeedButton11.Glyph);
  56.   GetTeeBrush(11,SpeedButton12.Glyph);
  57. end;
  58.  
  59. procedure TBrushStyleForm.SpeedButton1Click(Sender: TObject);
  60. begin
  61.   Series1.BarBrush.Image.Assign((Sender as TSpeedButton).Glyph);
  62. end;
  63.  
  64. procedure TBrushStyleForm.Button1Click(Sender: TObject);
  65. begin
  66.   EditChartBrush(Self,Series1.BarBrush);
  67. end;
  68.  
  69. initialization
  70.   RegisterClass(TBrushStyleForm);
  71. end.
  72.