Combobox ItemIndex

Für Fragen zur Programmiersprache auf welcher Lazarus aufbaut
Antworten
Chris237
Beiträge: 11
Registriert: Mi 18. Sep 2013, 20:09

Combobox ItemIndex

Beitrag von Chris237 »

Hey Leute Ich habe ein Problem. Ich glaube der Quelltext sagt alles:

Danke im Vorraus

Chris

Code: Alles auswählen

procedure TForm2.Button1Click(Sender: TObject);
begin
  if ComboBox1.ItemIndex = 0 and ComboBox2.ItemIndex = 0 then
  begin
    Form1.Panel1.Color:=clLime;
  end;                                     

Fehler: unit2.pas(42,44) Error: Incompatible types: got "Boolean" expected "Int64"

Benutzeravatar
theo
Beiträge: 10874
Registriert: Mo 11. Sep 2006, 19:01

Re: Combobox Itenindex

Beitrag von theo »

Klammern fehlen:
if (ComboBox1.ItemIndex = 0) and (ComboBox2.ItemIndex = 0) then

Antworten