На 5 закладках расположены GroupBox. В каждом по 5 CheckBox. Создана процедура по нажатию стандартного Ок.
procedure OKBtnClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
U_Test2: TU_Test2;
Ball2:Byte;
implementation
{$R *.dfm}
procedure TU_Test2.OKBtnClick(Sender: TObject);
begin
Ball2:=0;
if (checkbox2.Checked=true) and (checkbox4.Checked=true) and (checkbox1.Checked=false) and
(checkbox3.Checked=false) and (checkbox5.Checked) then Ball2:=Ball2+1;
if (checkbox7.Checked=true) and (checkbox9.Checked=true) and (checkbox6.Checked=false) and
(checkbox8.Checked=false) and (checkbox10.Checked) then Ball2:=Ball2+1;
if (checkbox12.Checked=true) and (checkbox15.Checked=true) and (checkbox11.Checked=false) and
(checkbox13.Checked=false) and (checkbox14.Checked=false) then Ball2:=Ball2+1;
if (checkbox17.Checked=true) and (checkbox20.Checked=true) and (checkbox16.Checked=true) and
(checkbox18.Checked=false) and (checkbox19.Checked) then Ball2:=Ball2+1;
if (checkbox22.Checked=true) and (checkbox24.Checked=true) and (checkbox21.Checked=false) and
(checkbox23.Checked=false) and (checkbox25.Checked=false) then Ball2:=Ball2+1;
Label7.Caption:='Ball2='+inttostr(Ball2);
end;
Почему значение Ball2 всегда присваивается 0?
Сроки поджимают. Буду рад любой идее. За =false и =true не критикуйте особо... Знаю как надо. Но...Добавлено (21.01.2013, 19:13)
---------------------------------------------