V
V
Vladimir2020-12-21 16:02:00
Delphi
Vladimir, 2020-12-21 16:02:00

Delphi error E2015 how to fix?

Hello, help me solve the problem, I can not understand what the error is. Thanks in advance!

procedure TForm1.bStartClick(Sender: TObject);
var cost: double;
begin
  cost := StrToFloat(eStart.Text);

  if cTax.Items = 1 then       //Выдает тут ошибку E2015 Operator not applicable to this operand type
  begin
    eResult.Text := FloatToStr(1.13 * cost);
    Com.Name := 'Налог составляет 13%';
  end;
end;

end.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hemul GM, 2020-12-21
@onlyJavaScriptProgrammer

Items is a list and you are comparing it to a number.
I guess you need the ItemIndex property

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question