home *** CD-ROM | disk | FTP | other *** search
- unit Zoom_Direction;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Base, ExtCtrls, TeeProcs, TeEngine, Chart, StdCtrls, Series;
-
- type
- TZoomDirection = class(TBaseForm)
- Label1: TLabel;
- ComboBox1: TComboBox;
- Series1: TLineSeries;
- Label2: TLabel;
- procedure ComboBox1Change(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure FormShow(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- ZoomDirection: TZoomDirection;
-
- implementation
-
- {$R *.DFM}
-
- procedure TZoomDirection.ComboBox1Change(Sender: TObject);
- begin
- inherited;
- Case ComboBox1.ItemIndex of
- 0: Chart1.Zoom.Direction:=tzdHorizontal;
- 1: Chart1.Zoom.Direction:=tzdVertical;
- 2: Chart1.Zoom.Direction:=tzdBoth;
- end;
- end;
-
- procedure TZoomDirection.FormCreate(Sender: TObject);
- begin
- inherited;
- Series1.FillSampleValues(40);
- end;
-
- procedure TZoomDirection.FormShow(Sender: TObject);
- begin
- inherited;
- ComboBox1.ItemIndex:=2;
- end;
-
- initialization
- RegisterClass(TZoomDirection);
- end.
-