-
Notifications
You must be signed in to change notification settings - Fork 0
/
unit14.pas
70 lines (54 loc) · 1.34 KB
/
unit14.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
unit Unit14;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Menus;
type
{ TForm14 }
TForm14 = class(TForm)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
ListBox1: TListBox;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
private
{ private declarations }
public
{ public declarations }
end;
var
Form14: TForm14;
vyber:integer=0;
implementation
{ TForm14 }
procedure TForm14.ListBox1SelectionChange(Sender: TObject; User: boolean);
begin
case ListBox1.SelCount of
1: Label2.Caption:='1 záznam?';
2,3,4: Label2.Caption:=IntToStr(ListBox1.SelCount)+' záznamy?';
else Label2.Caption:=IntToStr(ListBox1.SelCount)+' záznamov?';
end;
end;
procedure TForm14.Button1Click(Sender: TObject);
begin
vyber:=ListBox1.SelCount;
close;
end;
procedure TForm14.Button2Click(Sender: TObject);
begin
close;
end;
procedure TForm14.FormShow(Sender: TObject);
begin
Label2.Caption:='0 záznamov?';
vyber:=0;
ListBox1.ClearSelection;
end;
initialization
{$I unit14.lrs}
end.