Einzelnen Beitrag anzeigen

Fritzew

Registriert seit: 18. Nov 2015
Ort: Kehl
678 Beiträge
 
Delphi 11 Alexandria
 
#8

AW: 2 ComboBoxen mit gleichem Inhalt füllen per Multithreading

  Alt 6. Apr 2016, 22:16
Ändere mal

Code:
if Length(Arr_ComboBoxes) > 0 then
  begin
    for i_arr := Low(Arr_ComboBoxes) to High(Arr_ComboBoxes) do
    begin
      if Arr_ComboBoxes[i_arr] <> nil then
      begin
       // add
        Arr_ComboBoxes[i_arr].Items.BeginUpdate;
        try
          Arr_ComboBoxes[i_arr].Clear;
          for ix := 0 to GClassStaedteList.StaedteListe.Count - 1 do
          begin
           // Application.ProcessMessages;
            Arr_ComboBoxes[i_arr].AddItem(TStadtverwaltung(GClassStaedteList.StaedteListe[ix]).StdV_Plz + ', ' +
                                          TStadtverwaltung(GClassStaedteList.StaedteListe[ix]).StdV_Ort,
                                          TObject(TStadtverwaltung(GClassStaedteList.StaedteListe[ix])));
          end;
          // Add
        finally
          Arr_ComboBoxes[i_arr].Items.EndUpdate;
        end;
      end;
    end;
  end;
Fritz
Fritz Westermann
  Mit Zitat antworten Zitat