home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 October / Chip_2001-10_cd1.bin / zkuste / delphi / kolekce / d6 / FRCLX.ZIP / SOURCE / FR_AttrE.pas < prev    next >
Pascal/Delphi Source File  |  2001-07-03  |  2KB  |  80 lines

  1.  
  2. {******************************************}
  3. {                                          }
  4. {           FastReport CLX v2.4            }
  5. {               Tag editor                 }
  6. {                                          }
  7. { Copyright (c) 1998-2001 by Tzyganenko A. }
  8. {                                          }
  9. {******************************************}
  10.  
  11. unit FR_AttrE;
  12.  
  13. interface
  14.  
  15. {$I FR.inc}
  16.  
  17. uses
  18.   SysUtils, Classes, QGraphics, QControls, QForms, QDialogs,
  19.   QStdCtrls, FR_Class, FR_Ctrls, FR_Const;
  20.  
  21. type
  22.   TfrAttrEditorForm = class(TForm)
  23.     Button1: TButton;
  24.     Button2: TButton;
  25.     GB1: TGroupBox;
  26.     Edit1: TfrComboEdit;
  27.     procedure frSpeedButton1Click(Sender: TObject);
  28.     procedure FormCreate(Sender: TObject);
  29.   private
  30.     { Private declarations }
  31.     procedure Localize;
  32.   public
  33.     { Public declarations }
  34.     procedure ShowEditor(t: TfrView);
  35.   end;
  36.  
  37.  
  38. implementation
  39.  
  40. {$R *.xfm}
  41.  
  42. uses FR_Expr, FR_Utils;
  43.  
  44.  
  45. procedure TfrAttrEditorForm.ShowEditor(t: TfrView);
  46. begin
  47.   Edit1.Text := t.Tag;
  48.   if ShowModal = mrOk then
  49.   begin
  50.     frDesigner.BeforeChange;
  51.     t.Tag := Edit1.Text;
  52.   end;
  53. end;
  54.  
  55. procedure TfrAttrEditorForm.frSpeedButton1Click(Sender: TObject);
  56. begin
  57.   with TfrExprForm.Create(nil) do
  58.   begin
  59.     if ShowModal = mrOk then
  60.       Edit1.SelText := ExprMemo.Text;
  61.     Free;
  62.   end;
  63. end;
  64.  
  65. procedure TfrAttrEditorForm.Localize;
  66. begin
  67.   Caption := S53740;
  68.   Edit1.ButtonHint := S53575;
  69.   Button1.Caption := (SOk);
  70.   Button2.Caption := (SCancel);
  71. end;
  72.  
  73. procedure TfrAttrEditorForm.FormCreate(Sender: TObject);
  74. begin
  75.   Localize;
  76. end;
  77.  
  78. end.
  79.  
  80.