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

  1. unit Shape_VertAlign;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, StdCtrls, ExtCtrls, TeEngine, TeeShape, TeeProcs, Chart;
  8.  
  9. type
  10.   TShapeVertAlign = class(TBaseForm)
  11.     Series1: TChartShape;
  12.     Series2: TChartShape;
  13.     Series3: TChartShape;
  14.     RadioGroup1: TRadioGroup;
  15.     Label1: TLabel;
  16.     procedure RadioGroup1Click(Sender: TObject);
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. implementation
  24.  
  25. {$R *.DFM}
  26.  
  27. procedure TShapeVertAlign.RadioGroup1Click(Sender: TObject);
  28. var Align : TTeeVertAlign;
  29.     St    : String;
  30. begin
  31.   Align:=vaTop;
  32.  
  33.   Case RadioGroup1.ItemIndex of
  34.     0: begin Align:=vaTop;    St:='Text at Top';    end;
  35.     1: begin Align:=vaCenter; St:='Text at Center'; end;
  36.     2: begin Align:=vaBottom; St:='Text at Bottom'; end;
  37.   end;
  38.  
  39.   Series1.VertAlign:=Align; Series1.Text.Text:=St;
  40.   Series2.VertAlign:=Align; Series2.Text.Text:=St;
  41.   Series3.VertAlign:=Align; Series3.Text.Text:=St;
  42. end;
  43.  
  44. initialization
  45.   RegisterClass(TShapeVertAlign);
  46. end.
  47.