Hallo,
ich habe in einer combobox items und jenachdem welches item ausgewählt wird soll in der combobox2 ein bestimmtes item ausgewählt werden
Nur der nimmt immer nur die anweisung des letzten if's...
ich habe in einer combobox items und jenachdem welches item ausgewählt wird soll in der combobox2 ein bestimmtes item ausgewählt werden
Nur der nimmt immer nur die anweisung des letzten if's...
void __fastcall TFormtest::ComboBox1Change(TObject *Sender)
{
if (ComboBox1->Text == "A1" || "A2" || "A3" || "NA" || "EA" || "NB" || "BA" || "IT" || "KP" || "RP")
{
ComboBox2->ItemIndex = 0;
}
if (ComboBox1->Text == "BP" )
{
ComboBox2->ItemIndex = 1;
}
if (ComboBox1->Text == "KA" || "RA")
{
ComboBox2->ItemIndex = 3;
}
if (ComboBox1->Text == "S1" || "S2" || "S3")
{
ComboBox2->ItemIndex = 4;
}
}