
13.10.2010, 17:45
|
 |
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, CheckLst;
type
TForm1 = class(TForm)
CheckListBox1: TCheckListBox;
Memo1: TMemo;
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
stringlist: TStrings;
begin
Memo1.Clear;
stringlist:=TStringList.Create;
try
for i:=0 to CheckListBox1.Count-1 do
if CheckListBox1.Checked[i] then
begin
stringlist.LoadFromFile(CheckListBox1.Items[i]);
Memo1.Lines.AddStrings(stringlist);
end;
finally
stringlist.Free;
end;
Label1.Caption:=IntToStr(Memo1.Lines.Count);
end;
end.
__________________
Пишу программы за еду.
__________________
|