Hello. I make the button inactive. It is necessary to fill in all the fields after which the key will become active, but the condition does not work. Tell me what the problem is.

procedure TForm7.FormKeyPress(Sender: TObject; var Key: Char); begin if (edit1.Text<>'')and (edit2.Text<>'')and (edit3.Text<>'')and (edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and (edit7.Text<>'') then Form7.Button1.Enabled:=True; end; end. 
  • one
    Are you sure this code is executed? Is this handler assigned to all the edit (as I understand this problem was solved)? Put a breakpoint, check for each of the edit'ov. - Yura Ivanov
  • I'll check it out - Nick_qd
  • thanks, everything works, made for all edits, earned - Nick_qd

1 answer 1

This task should be solved with the help of TAction