unit DocPrt;
|
|
interface
|
|
uses
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Dialogs, StdCtrls, CheckLst, ExtCtrls, Buttons;
|
|
type
|
TPrintForm = class(TForm)
|
Panel1: TPanel;
|
DocGB: TGroupBox;
|
CheckListBox1: TCheckListBox;
|
SelecAllBt: TBitBtn;
|
EraseBt: TBitBtn;
|
PrtBt: TBitBtn;
|
ExitBt: TBitBtn;
|
ListBox1: TListBox;
|
procedure SelecAllBtClick(Sender: TObject);
|
procedure EraseBtClick(Sender: TObject);
|
procedure ExitBtClick(Sender: TObject);
|
procedure PrtBtClick(Sender: TObject);
|
procedure ListBox1Click(Sender: TObject);
|
procedure CheckListBox1Click(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
private
|
{ Private declarations }
|
public
|
{ Public declarations }
|
end;
|
|
var
|
PrintForm: TPrintForm;
|
|
implementation
|
|
{$R *.dfm}
|
|
procedure TPrintForm.CheckListBox1Click(Sender: TObject);
|
begin
|
listBox1.ItemIndex := CheckListBox1.ItemIndex;
|
end;
|
|
procedure TPrintForm.EraseBtClick(Sender: TObject);
|
var
|
i : Integer;
|
begin
|
for I := 0 to CheckListBox1.Items.Count - 1 do
|
begin
|
CheckListBox1.Checked[i] := False;
|
end;
|
end;
|
|
procedure TPrintForm.ExitBtClick(Sender: TObject);
|
begin
|
ModalResult := MrCancel;
|
end;
|
|
procedure TPrintForm.FormCreate(Sender: TObject);
|
begin
|
PostMessage(Handle,WM_ACTIVATE,WA_CLICKACTIVE,0);
|
end;
|
|
procedure TPrintForm.ListBox1Click(Sender: TObject);
|
begin
|
CheckListBox1.ItemIndex := listBox1.ItemIndex;
|
end;
|
|
procedure TPrintForm.PrtBtClick(Sender: TObject);
|
begin
|
ModalResult := MrOk;
|
end;
|
|
procedure TPrintForm.SelecAllBtClick(Sender: TObject);
|
var
|
i : Integer;
|
begin
|
for I := 0 to CheckListBox1.Items.Count - 1 do
|
begin
|
CheckListBox1.Checked[i] := True;
|
end;
|
end;
|
|
end.
|