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

  1. {****************************************}
  2. {    TFastLineSeries Editor Dialog       }
  3. { Copyright (c) 1996-98 by David Berneda }
  4. {****************************************}
  5. {$I teedefs.inc}
  6. unit FLineEdi;
  7.  
  8. interface
  9.  
  10. uses
  11.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  12.   Forms, Dialogs, StdCtrls, ExtCtrls, Chart, Buttons,Teengine,Series;
  13.  
  14. type
  15.   TFastLineSeriesEditor = class(TForm)
  16.     BLinePen: TButton;
  17.     SHColor: TShape;
  18.     procedure BLinePenClick(Sender: TObject);
  19.     procedure FormShow(Sender: TObject);
  20.     procedure SHColorMouseUp(Sender: TObject; Button: TMouseButton;
  21.       Shift: TShiftState; X, Y: Integer);
  22.   private
  23.     { Private declarations }
  24.   public
  25.     { Public declarations }
  26.     TheSeries:TFastLineSeries;
  27.   end;
  28.  
  29. implementation
  30.  
  31. {$R *.DFM}
  32. Uses PenDlg, TeeProcs;
  33.  
  34. procedure TFastLineSeriesEditor.BLinePenClick(Sender: TObject);
  35. begin
  36.   With TheSeries do
  37.   begin
  38.     LinePen.Color:=SeriesColor;
  39.     EditChartPen(Self,LinePen);
  40.     SeriesColor:=LinePen.Color;
  41.     SHColor.Brush.Color:=SeriesColor;
  42.   end;
  43. end;
  44.  
  45. procedure TFastLineSeriesEditor.FormShow(Sender: TObject);
  46. begin
  47.   Screen.Cursor:=crDefault;
  48.   TheSeries:=TFastLineSeries(Tag);
  49.   SHColor.Brush.Color:=TheSeries.SeriesColor;
  50.   SHColor.Cursor:=crTeeHand;
  51. end;
  52.  
  53. procedure TFastLineSeriesEditor.SHColorMouseUp(Sender: TObject;
  54.   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  55. begin
  56.   With TheSeries do
  57.   begin
  58.     SeriesColor:=EditColor(Self,SeriesColor);
  59.     SHColor.Brush.Color:=SeriesColor;
  60.   end;
  61. end;
  62.  
  63. initialization
  64.   RegisterClass(TFastLineSeriesEditor);
  65. end.
  66.