Untitled
unknown
pascal
3 years ago
1.3 kB
6
Indexable
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
ComboBox1: TComboBox;
Edit1: TEdit;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
s: string;
i: integer;
s1, s2, s3: boolean;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
s := Edit1.Text + ' ви обрали ';
s1 := CheckBox1.Checked;
s2 := CheckBox2.Checked;
s3 := CheckBox3.Checked;
//-------------------
if s1 then
s := s + CheckBox1.Caption + ', ';
if s2 then
s := s + CheckBox2.Caption + ', ';
if s3 then
s := s + CheckBox3.Caption + ', ';
i := ComboBox1.ItemIndex;
case i of
0: s := s + 'у молодшій вітковій категорії';
1: s := s + 'у середній вітковій категорії';
2: s := s + 'у старшій вітковій категорії';
end;
ShowMessage(s);
end;
end.
Editor is loading...