Курсовая работа: Разработка базы данных флагов мира
cbLanguage2.ItemIndex := cbLanguage2.Items.IndexOf(DM.qWork.FieldByName('Language').Text);
end;
if DM.qWork.RecordCount = 3 then
begin
DM.qWork.Next;
cbLanguage3.ItemIndex := cbLanguage3.Items.IndexOf(DM.qWork.FieldByName('Language').Text);
end;
DM.qWork.Close;
Strana := DM.tbCountryCountry.Text;
eCountry.Text := DM.tbCountryCountry.Text;
eCapital.Text := DM.tbCountryCapital.Text;
end;
procedure TfrmEditCountry.cbLanguage1Change(Sender: TObject);
begin
if (cbLanguage1.Text = cbLanguage2.Text) then
begin
cbLanguage2.ItemIndex := cbLanguage3.ItemIndex;
cbLanguage3.ItemIndex := 0;
end;
if (cbLanguage1.Text = cbLanguage3.Text) then
begin
cbLanguage3.ItemIndex := 0;
end;
end;
procedure TfrmEditCountry.cbLanguage2Change(Sender: TObject);
begin
if (cbLanguage2.Text = cbLanguage1.Text) or (cbLanguage2.Text = cbLanguage3.Text) and (cbLanguage2.Text <> '--- íåò ---') then
begin
cbLanguage2.ItemIndex := cbLanguage3.ItemIndex;