home *** CD-ROM | disk | FTP | other *** search
-
- {******************************************}
- { }
- { FastReport CLX v2.4 }
- { Report options }
- { }
- { Copyright (c) 1998-2001 by Tzyganenko A. }
- { }
- {******************************************}
-
- unit FR_Dopt;
-
- interface
-
- {$I FR.inc}
-
- uses
- SysUtils, Types, Classes, QGraphics, QControls, QForms, QDialogs,
- QStdCtrls, FR_Const, QExtCtrls, FR_Ctrls;
-
- type
- TfrDocOptForm = class(TForm)
- GroupBox1: TGroupBox;
- CB1: TCheckBox;
- GroupBox2: TGroupBox;
- CB2: TCheckBox;
- Button1: TButton;
- Button2: TButton;
- LB1: TListBox;
- Image1: TImage;
- procedure FormActivate(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure LB1DrawItem(Sender: TObject; Index: Integer; ARect: TRect;
- State: TOwnerDrawState; var Handled: Boolean);
- private
- { Private declarations }
- procedure Localize;
- public
- { Public declarations }
- end;
-
-
- implementation
-
- {$R *.xfm}
-
- uses FR_Prntr, FR_Utils;
-
-
- procedure TfrDocOptForm.FormActivate(Sender: TObject);
- begin
- LB1.Items.Assign(Prn.Printers);
- LB1.ItemIndex := Prn.PrinterIndex;
- end;
-
- procedure TfrDocOptForm.Localize;
- begin
- Caption := S53370;
- GroupBox1.Caption := S53371;
- CB1.Caption := S53372;
- GroupBox2.Caption := S53373;
- CB2.Caption := S53374;
- Button1.Caption := (SOk);
- Button2.Caption := (SCancel);
- end;
-
- procedure TfrDocOptForm.FormCreate(Sender: TObject);
- begin
- Localize;
- end;
-
- procedure TfrDocOptForm.LB1DrawItem(Sender: TObject; Index: Integer;
- ARect: TRect; State: TOwnerDrawState; var Handled: Boolean);
- var
- r: TRect;
- begin
- r := ARect;
- r.Right := r.Left + 18;
- r.Bottom := r.Top + 16;
- OffsetRect(r, 2, 0);
- with LB1.Canvas do
- begin
- FillRect(ARect);
- frDrawTransparent(LB1.Canvas, r.Left, r.Top, Image1.Picture.Bitmap);
- TextOut(ARect.Left + 24, ARect.Top + 1, LB1.Items[Index]);
- end;
- end;
-
-
- end.
-
-