home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / TEECHART / Src Code / IEDIAXIS.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-10-24  |  15.8 KB  |  576 lines

  1. {**********************************************}
  2. {  TCustomChart (or derived) Editor Dialog     }
  3. {  Copyright (c) 1996-98 by David Berneda      }
  4. {**********************************************}
  5. {$I teedefs.inc}
  6. unit IEdiAxis;
  7.  
  8. interface
  9.  
  10. uses
  11.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  12.   StdCtrls, ComCtrls, ExtCtrls, Teengine;
  13.  
  14. type
  15.   TFormTeeAxis = class(TForm)
  16.     CBShow: TCheckBox;
  17.     RGWhich: TRadioGroup;
  18.     CBVisible: TCheckBox;
  19.     PageAxis: TPageControl;
  20.     TabScales: TTabSheet;
  21.     L5: TLabel;
  22.     L8: TLabel;
  23.     LAxisMax: TLabel;
  24.     LAxisMin: TLabel;
  25.     L6: TLabel;
  26.     LAxisIncre: TLabel;
  27.     CBAutomatic: TCheckBox;
  28.     CBLogarithmic: TCheckBox;
  29.     CBInverted: TCheckBox;
  30.     CBAutoMax: TCheckBox;
  31.     CBAutoMin: TCheckBox;
  32.     BAxisMax: TButton;
  33.     BAxisMin: TButton;
  34.     BIncre: TButton;
  35.     TabTitle: TTabSheet;
  36.     L14: TLabel;
  37.     L3: TLabel;
  38.     L9: TLabel;
  39.     ETitle: TEdit;
  40.     BTitleFont: TButton;
  41.     SETitleAngle: TEdit;
  42.     TabLabels: TTabSheet;
  43.     L20: TLabel;
  44.     LabelAxisFormat: TLabel;
  45.     L26: TLabel;
  46.     L23: TLabel;
  47.     CBLabels: TCheckBox;
  48.     CBOnAxis: TCheckBox;
  49.     CBRoundFirst: TCheckBox;
  50.     EValuesFormat: TEdit;
  51.     SESepar: TEdit;
  52.     BLabelsFont: TButton;
  53.     SELabelsSize: TEdit;
  54.     SELabelsAngle: TEdit;
  55.     RGLabelStyle: TRadioGroup;
  56.     CBMultiline: TCheckBox;
  57.     TabTicks: TTabSheet;
  58.     L28: TLabel;
  59.     L29: TLabel;
  60.     L30: TLabel;
  61.     L31: TLabel;
  62.     BAxisPen: TButton;
  63.     BTickPen: TButton;
  64.     BTickInner: TButton;
  65.     SEAxisTickLength: TEdit;
  66.     SEInnerTicksLength: TEdit;
  67.     BTickMinor: TButton;
  68.     BAxisGrid: TButton;
  69.     SEAxisMinorTickLen: TEdit;
  70.     SEMinorCount: TEdit;
  71.     CBTickOnLabels: TCheckBox;
  72.     CBGridCentered: TCheckBox;
  73.     SETitleSize: TEdit;
  74.     UDInnerTicksLength: TUpDown;
  75.     UDAxisTickLength: TUpDown;
  76.     UDAxisMinorTickLen: TUpDown;
  77.     UDMinorCount: TUpDown;
  78.     UDTitleSize: TUpDown;
  79.     UDTitleAngle: TUpDown;
  80.     UDSepar: TUpDown;
  81.     UDLabelsSize: TUpDown;
  82.     UDLabelsAngle: TUpDown;
  83.     TabPositions: TTabSheet;
  84.     Label41: TLabel;
  85.     Label42: TLabel;
  86.     Label43: TLabel;
  87.     EPos: TEdit;
  88.     EStart: TEdit;
  89.     EEnd: TEdit;
  90.     UDPos: TUpDown;
  91.     UDStart: TUpDown;
  92.     UDEnd: TUpDown;
  93.     procedure BAxisGridClick(Sender: TObject);
  94.     procedure BTickInnerClick(Sender: TObject);
  95.     procedure BTickMinorClick(Sender: TObject);
  96.     procedure FormShow(Sender: TObject);
  97.     procedure RGWhichClick(Sender: TObject);
  98.     procedure CBVisibleClick(Sender: TObject);
  99.     procedure SEAxisTickLengthChange(Sender: TObject);
  100.     procedure CBAutomaticClick(Sender: TObject);
  101.     procedure ETitleChange(Sender: TObject);
  102.     procedure BTitleFontClick(Sender: TObject);
  103.     procedure BAxisMaxClick(Sender: TObject);
  104.     procedure BAxisMinClick(Sender: TObject);
  105.     procedure BIncreClick(Sender: TObject);
  106.     procedure CBLogarithmicClick(Sender: TObject);
  107.     procedure SEInnerTicksLengthChange(Sender: TObject);
  108.     procedure SEAxisMinorTickLenChange(Sender: TObject);
  109.     procedure SEMinorCountChange(Sender: TObject);
  110.     procedure CBAutoMaxClick(Sender: TObject);
  111.     procedure CBInvertedClick(Sender: TObject);
  112.     procedure SETitleAngleChange(Sender: TObject);
  113.     procedure SETitleSizeChange(Sender: TObject);
  114.     procedure CBLabelsClick(Sender: TObject);
  115.     procedure SELabelsAngleChange(Sender: TObject);
  116.     procedure RGLabelStyleClick(Sender: TObject);
  117.     procedure SELabelsSizeChange(Sender: TObject);
  118.     procedure CBOnAxisClick(Sender: TObject);
  119.     procedure SESeparChange(Sender: TObject);
  120.     procedure CBRoundFirstClick(Sender: TObject);
  121.     procedure EValuesFormatChange(Sender: TObject);
  122.     procedure BLabelsFontClick(Sender: TObject);
  123.     procedure BAxisPenClick(Sender: TObject);
  124.     procedure BTickPenClick(Sender: TObject);
  125.     procedure CBTickOnLabelsClick(Sender: TObject);
  126.     procedure CBGridCenteredClick(Sender: TObject);
  127.     procedure CBMultilineClick(Sender: TObject);
  128.     procedure PageAxisChange(Sender: TObject);
  129.     procedure CBShowClick(Sender: TObject);
  130.     procedure FormCreate(Sender: TObject);
  131.     procedure PageAxisChanging(Sender: TObject; var AllowChange: Boolean);
  132.     procedure EPosChange(Sender: TObject);
  133.     procedure EStartChange(Sender: TObject);
  134.     procedure EEndChange(Sender: TObject);
  135.   private
  136.     { Private declarations }
  137.     CreatingForm : Boolean;
  138.     Procedure SetAxisScales;
  139.   public
  140.     { Public declarations }
  141.     TheAxis : TCustomChartAxis;
  142.     Constructor CreateAxis(Owner:TComponent; AAxis:TCustomChartAxis);
  143.   end;
  144.  
  145. implementation
  146.  
  147. {$R *.DFM}
  148. Uses TeeConst,TeeProcs,AxisIncr,PenDlg,BrushDlg,AxMaxMin,Chart;
  149.  
  150. Constructor TFormTeeAxis.CreateAxis(Owner:TComponent; AAxis:TCustomChartAxis);
  151. begin
  152.   inherited Create(Owner);
  153.   TheAxis:=AAxis;
  154. end;
  155.  
  156. procedure TFormTeeAxis.BAxisGridClick(Sender: TObject);
  157. begin
  158.   EditChartPen(Self,TheAxis.Grid);
  159. end;
  160.  
  161. procedure TFormTeeAxis.BTickInnerClick(Sender: TObject);
  162. begin
  163.   EditChartPen(Self,TheAxis.TicksInner);
  164. end;
  165.  
  166. procedure TFormTeeAxis.BTickMinorClick(Sender: TObject);
  167. begin
  168.   EditChartPen(Self,TheAxis.MinorTicks);
  169. end;
  170.  
  171. procedure TFormTeeAxis.FormShow(Sender: TObject);
  172. begin
  173.   With TheAxis.ParentChart do
  174.   begin
  175.     if TheAxis=LeftAxis   then RGWhich.ItemIndex:=0 else
  176.     if TheAxis=RightAxis  then RGWhich.ItemIndex:=1 else
  177.     if TheAxis=TopAxis    then RGWhich.ItemIndex:=2 else
  178.     if TheAxis=BottomAxis then RGWhich.ItemIndex:=3 else
  179.     if TheAxis=DepthAxis  then RGWhich.ItemIndex:=4;
  180.     CBShow.Checked:=AxisVisible;
  181.   end;
  182.   CBVisible.Checked:=TheAxis.Visible;
  183.   PageAxis.ActivePage:=TabScales;
  184.   PageAxisChange(Self);
  185. end;
  186.  
  187. procedure TFormTeeAxis.RGWhichClick(Sender: TObject);
  188. begin
  189.   With TheAxis.ParentChart do
  190.   Case TRadioGroup(Sender).ItemIndex of
  191.     0: TheAxis:=LeftAxis;
  192.     1: TheAxis:=RightAxis;
  193.     2: TheAxis:=TopAxis;
  194.     3: TheAxis:=BottomAxis;
  195.   else TheAxis:=DepthAxis;
  196.   end;
  197.   CBVisible.Checked:=TheAxis.Visible;
  198.   CreatingForm:=True;
  199.   PageAxisChange(Self);
  200. end;
  201.  
  202. procedure TFormTeeAxis.CBVisibleClick(Sender: TObject);
  203. begin
  204.   TheAxis.Visible:=CBVisible.Checked;
  205. end;
  206.  
  207. procedure TFormTeeAxis.SEAxisTickLengthChange(Sender: TObject);
  208. begin
  209.   if not CreatingForm then TheAxis.TickLength:=UDAxisTickLength.Position;
  210. end;
  211.  
  212. procedure TFormTeeAxis.CBAutomaticClick(Sender: TObject);
  213. begin
  214.   With TheAxis do
  215.   begin
  216.     Automatic:=CBAutomatic.Checked;
  217.     if Automatic then AdjustMaxMin
  218.     else
  219.     begin
  220.       AutomaticMaximum:=False;
  221.       AutomaticMinimum:=False;
  222.     end;
  223.   end;
  224.   SetAxisScales;
  225. end;
  226.  
  227. procedure TFormTeeAxis.ETitleChange(Sender: TObject);
  228. begin
  229.   TheAxis.Title.Caption:=ETitle.Text;
  230. end;
  231.  
  232. procedure TFormTeeAxis.BTitleFontClick(Sender: TObject);
  233. begin
  234.   With TheAxis.Title do Font:=InternalEditFont(Self,Font);
  235. end;
  236.  
  237. procedure TFormTeeAxis.BAxisMaxClick(Sender: TObject);
  238. begin
  239.   With TAxisMaxMin.Create(Self) do
  240.   try
  241.     Caption:=TeeMsg_Maximum+' '+(TheAxis.ParentChart as TCustomChart).AxisTitleOrName(TheAxis);
  242.     IsDateTime:=TheAxis.IsDateTime;
  243.     MaxMin:=TheAxis.Maximum;
  244.     if ShowModal=mrOk then
  245.     Begin
  246.       TheAxis.Maximum:=MaxMin;
  247.       CBAutoMax.Checked:=False;
  248.       SetAxisScales;
  249.     end;
  250.   finally
  251.     Free;
  252.   end;
  253. end;
  254.  
  255. procedure TFormTeeAxis.BAxisMinClick(Sender: TObject);
  256. begin
  257.   With TAxisMaxMin.Create(Self) do
  258.   try
  259.     Caption:=TeeMsg_Minimum+' '+(TheAxis.ParentChart as TCustomChart).AxisTitleOrName(TheAxis);
  260.     IsDateTime:=TheAxis.IsDateTime;
  261.     MaxMin:=TheAxis.Minimum;
  262.     if ShowModal=mrOk then
  263.     Begin
  264.       TheAxis.Minimum:=MaxMin;
  265.       CBAutoMin.Checked:=False;
  266.       SetAxisScales;
  267.     end;
  268.   finally
  269.     Free;
  270.   end;
  271. end;
  272.  
  273. procedure TFormTeeAxis.BIncreClick(Sender: TObject);
  274. begin
  275.   With TAxisIncrement.Create(Self) do
  276.   try
  277.     Caption:=Format(TeeMsg_DesiredIncrement,
  278.                    [(TheAxis.ParentChart as TCustomChart).AxisTitleOrName(TheAxis)]);
  279.     IsDateTime:=TheAxis.IsDateTime;
  280.     IsExact:=TheAxis.ExactDateTime;
  281.     Increment:=TheAxis.Increment;
  282.     IStep:=FindDateTimeStep(Increment);
  283.     if ShowModal=mrOk then
  284.     Begin
  285.       TheAxis.Increment:=Increment;
  286.       TheAxis.ExactDateTime:=IsExact;
  287.       SetAxisScales;
  288.     end;
  289.   finally
  290.     Free;
  291.   end;
  292. end;
  293.  
  294. procedure TFormTeeAxis.CBLogarithmicClick(Sender: TObject);
  295. begin
  296.   try
  297.     TheAxis.Logarithmic:=CBLogarithmic.Checked;
  298.   except
  299.     on AxisException do
  300.     Begin
  301.       TheAxis.Logarithmic:=False;
  302.       CBLogarithmic.Checked:=False;
  303.       Raise;
  304.     end;
  305.   end;
  306. end;
  307.  
  308. procedure TFormTeeAxis.SEInnerTicksLengthChange(Sender: TObject);
  309. begin
  310.   if not CreatingForm then
  311.      TheAxis.TickInnerLength:=UDInnerTicksLength.Position;
  312. end;
  313.  
  314. procedure TFormTeeAxis.SEAxisMinorTickLenChange(Sender: TObject);
  315. begin
  316.   if not CreatingForm then TheAxis.MinorTickLength:=UDAxisMinorTickLen.Position;
  317. end;
  318.  
  319. procedure TFormTeeAxis.SEMinorCountChange(Sender: TObject);
  320. begin
  321.   if not CreatingForm then TheAxis.MinorTickCount:=UDMinorCount.Position;
  322. end;
  323.  
  324. procedure TFormTeeAxis.CBAutoMaxClick(Sender: TObject);
  325. begin
  326.   With TheAxis do
  327.   if Sender=CBAutoMax then AutomaticMaximum:=CBAutoMax.Checked
  328.                       else AutomaticMinimum:=CBAutoMin.Checked;
  329.   TheAxis.AdjustMaxMin;
  330.   SetAxisScales;
  331. end;
  332.  
  333. procedure TFormTeeAxis.CBInvertedClick(Sender: TObject);
  334. begin
  335.   TheAxis.Inverted:=CBInverted.Checked;
  336. end;
  337.  
  338. procedure TFormTeeAxis.SETitleAngleChange(Sender: TObject);
  339. begin
  340.   if not CreatingForm then TheAxis.Title.Angle:=UDTitleAngle.Position;
  341. end;
  342.  
  343. procedure TFormTeeAxis.SETitleSizeChange(Sender: TObject);
  344. begin
  345.   if not CreatingForm then TheAxis.TitleSize:=UDTitleSize.Position;
  346. end;
  347.  
  348. procedure TFormTeeAxis.CBLabelsClick(Sender: TObject);
  349. begin
  350.   TheAxis.Labels:=CBLabels.Checked;
  351. end;
  352.  
  353. procedure TFormTeeAxis.SELabelsAngleChange(Sender: TObject);
  354. begin
  355.   if not CreatingForm then TheAxis.LabelsAngle:=UDLabelsAngle.Position;
  356. end;
  357.  
  358. procedure TFormTeeAxis.RGLabelStyleClick(Sender: TObject);
  359. begin
  360.   TheAxis.LabelStyle:=TAxisLabelStyle(RGLabelStyle.ItemIndex);
  361. end;
  362.  
  363. procedure TFormTeeAxis.SELabelsSizeChange(Sender: TObject);
  364. begin
  365.   if not CreatingForm then TheAxis.LabelsSize:=UDLabelsSize.Position;
  366. end;
  367.  
  368. procedure TFormTeeAxis.CBOnAxisClick(Sender: TObject);
  369. begin
  370.   TheAxis.LabelsOnAxis:=CBOnAxis.Checked;
  371. end;
  372.  
  373. procedure TFormTeeAxis.SESeparChange(Sender: TObject);
  374. begin
  375.   if not CreatingForm then TheAxis.LabelsSeparation:=UDSepar.Position;
  376. end;
  377.  
  378. procedure TFormTeeAxis.CBRoundFirstClick(Sender: TObject);
  379. begin
  380.   TheAxis.RoundFirstLabel:=CBRoundFirst.Checked;
  381. end;
  382.  
  383. procedure TFormTeeAxis.EValuesFormatChange(Sender: TObject);
  384. begin
  385.   With TheAxis do
  386.   if IsDateTime then DateTimeFormat:=EValuesFormat.Text
  387.                 else AxisValuesFormat:=LocalToDelphiFormat(EValuesFormat.Text);
  388. end;
  389.  
  390. procedure TFormTeeAxis.BLabelsFontClick(Sender: TObject);
  391. begin
  392.   With TheAxis do LabelsFont:=InternalEditFont(Self,LabelsFont);
  393. end;
  394.  
  395. procedure TFormTeeAxis.BAxisPenClick(Sender: TObject);
  396. begin
  397.   EditChartPen(Self,TheAxis.Axis);
  398. end;
  399.  
  400. procedure TFormTeeAxis.BTickPenClick(Sender: TObject);
  401. begin
  402.   EditChartPen(Self,TheAxis.Ticks);
  403. end;
  404.  
  405. procedure TFormTeeAxis.CBTickOnLabelsClick(Sender: TObject);
  406. begin
  407.   TheAxis.TickOnLabelsOnly:=CBTickOnLabels.Checked;
  408. end;
  409.  
  410. procedure TFormTeeAxis.CBGridCenteredClick(Sender: TObject);
  411. begin
  412.   TheAxis.GridCentered:=CBGridCentered.Checked;
  413. end;
  414.  
  415. procedure TFormTeeAxis.CBMultilineClick(Sender: TObject);
  416. begin
  417.   TheAxis.LabelsMultiLine:=CBMultiline.Checked;
  418. end;
  419.  
  420. Procedure TFormTeeAxis.SetAxisScales;
  421. Begin
  422.   With TheAxis do
  423.   Begin
  424.     LAxisIncre.Caption:=GetIncrementText(Self,Increment,IsDateTime,True,AxisValuesFormat);
  425.     if IsDateTime then
  426.     begin
  427.       if Minimum>=1 then LAxisMin.Caption:=DateTimeToStr(Minimum)
  428.                     else LAxisMin.Caption:=TimeToStr(Minimum);
  429.       if Maximum>=1 then LAxisMax.Caption:=DateTimeToStr(Maximum)
  430.                     else LAxisMax.Caption:=TimeToStr(Maximum);
  431.     end
  432.     else
  433.     begin
  434.       LAxisMin.Caption:=FormatFloat(AxisValuesFormat,Minimum);
  435.       LAxisMax.Caption:=FormatFloat(AxisValuesFormat,Maximum);
  436.     end;
  437.     CBAutomatic.Checked:=Automatic;
  438.     CBAutoMax.Checked:=AutomaticMaximum;
  439.     CBAutoMin.Checked:=AutomaticMinimum;
  440.     CBLogarithmic.Checked:=Logarithmic;
  441.     CBLogarithmic.Enabled:=not IsDepthAxis;
  442.     CBInverted.Checked:=Inverted;
  443.     { enable controls... }
  444.     BAxisMax.Enabled:=(not Automatic) and (not AutomaticMaximum);
  445.     BAxisMin.Enabled:=(not Automatic) and (not AutomaticMinimum);
  446.     EnableControls(not Automatic,[CBAutoMax,CBAutoMin]);
  447.   end;
  448. end;
  449.  
  450. procedure TFormTeeAxis.PageAxisChange(Sender: TObject);
  451.  
  452.   Procedure SetAxisLabels;
  453.   var tmp : String;
  454.   begin  { Axis Labels  }
  455.     With TheAxis do
  456.     Begin
  457.       CBLabels.Checked:=Labels;
  458.       RGLabelStyle.ItemIndex:=Ord(LabelStyle);
  459.       CBOnAxis.Checked:=LabelsOnAxis;
  460.       CBRoundFirst.Checked:=RoundFirstLabel;
  461.       UDLabelsAngle.Position:=LabelsAngle;
  462.       UDSepar.Position:=LabelsSeparation;
  463.       UDLabelsSize.Position:=LabelsSize;
  464.       if IsDateTime then
  465.       begin
  466.         LabelAxisFormat.Caption:=TeeMsg_DateTimeFormat;
  467.         tmp:=DateTimeFormat;
  468.         if tmp='' then tmp:=DateTimeDefaultFormat(Maximum-Minimum);
  469.         EValuesFormat.Text:=tmp;
  470.       end
  471.       else
  472.       begin
  473.         LabelAxisFormat.Caption:=TeeMsg_ValuesFormat;
  474.         tmp:=AxisValuesFormat;
  475.         if tmp='' then tmp:=TeeMsg_DefValueFormat;
  476.         EValuesFormat.Text:=DelphiToLocalFormat(tmp);
  477.       end;
  478.     end;
  479.   end;
  480.  
  481.   Procedure SetAxisTicks;
  482.   begin
  483.     With TheAxis do
  484.     Begin
  485.       UDAxisTickLength.Position:=TickLength;
  486.       UDInnerTicksLength.Position:=TickInnerLength;
  487.       UDAxisMinorTickLen.Position:=MinorTickLength;
  488.       UDMinorCount.Position:=MinorTickCount;
  489.       CBTickOnLabels.Checked:=TickOnLabelsOnly;
  490.       CBGridCentered.Checked:=GridCentered;
  491.     end;
  492.   end;
  493.  
  494.   Procedure SetAxisTitle;
  495.   begin
  496.     With TheAxis do
  497.     Begin
  498.       ETitle.Text:=Title.Caption;
  499.       UDTitleAngle.Position:=Title.Angle;
  500.       UDTitleSize.Position:=TitleSize;
  501.     end;
  502.   end;
  503.  
  504.   Procedure SetAxisPositions;
  505.   begin
  506.     With TheAxis do
  507.     Begin
  508.       UDPos.Position:=Round(PositionPercent);
  509.       UDStart.Position:=Round(StartPosition);
  510.       UDEnd.Position:=Round(EndPosition);
  511.       EPos.Enabled:=not IsDepthAxis;
  512.       EStart.Enabled:=not IsDepthAxis;
  513.       EEnd.Enabled:=not IsDepthAxis;
  514.     end;
  515.   end;
  516.  
  517. begin
  518.   With PageAxis do
  519.   if ActivePage=TabLabels then SetAxisLabels else
  520.   if ActivePage=TabScales then SetAxisScales else
  521.   if ActivePage=TabTitle then SetAxisTitle else
  522.   if ActivePage=TabTicks then SetAxisTicks else
  523.   if ActivePage=TabPositions then SetAxisPositions;
  524.   CreatingForm:=False;
  525. end;
  526.  
  527. procedure TFormTeeAxis.CBShowClick(Sender: TObject);
  528. begin
  529.   TheAxis.ParentChart.AxisVisible:= TCheckBox(Sender).Checked;
  530. end;
  531.  
  532. procedure TFormTeeAxis.FormCreate(Sender: TObject);
  533. begin
  534.   CreatingForm:=True;
  535.   {$IFDEF D3}
  536.   PageAxis.HotTrack:=True;
  537.   {$ENDIF}
  538. end;
  539.  
  540. procedure TFormTeeAxis.PageAxisChanging(Sender: TObject;
  541.   var AllowChange: Boolean);
  542. begin
  543.   CreatingForm:=True;
  544. end;
  545.  
  546. procedure TFormTeeAxis.EPosChange(Sender: TObject);
  547. begin
  548.   if not CreatingForm then TheAxis.PositionPercent:=UDPos.Position;
  549. end;
  550.  
  551. procedure TFormTeeAxis.EStartChange(Sender: TObject);
  552. begin
  553.   if not CreatingForm then
  554.   begin
  555.     if UDStart.Position<TheAxis.EndPosition then
  556.        TheAxis.StartPosition:=UDStart.Position
  557.     else
  558.        UDStart.Position:=Round(TheAxis.StartPosition);
  559.   end;
  560. end;
  561.  
  562. procedure TFormTeeAxis.EEndChange(Sender: TObject);
  563. begin
  564.   if not CreatingForm then
  565.   begin
  566.     if UDEnd.Position>TheAxis.StartPosition then
  567.        TheAxis.EndPosition:=UDEnd.Position
  568.     else
  569.        UDEnd.Position:=Round(TheAxis.EndPosition);
  570.   end;
  571. end;
  572.  
  573. initialization
  574.   RegisterClass(TFormTeeAxis);
  575. end.
  576.