Einzelnen Beitrag anzeigen

Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#4

Re: String aus Ini soll ComboBox auf gleichen Item einstelle

  Alt 14. Dez 2005, 22:36
Nicht sehr performant, aber wenn die Liste nicht zu lange ist, vernachlässigbar:

Delphi-Quellcode:
for i := 0 to ComboBox1.Items.Count - 1 do
begin
  if ComboBox1.Items[i] = 'blubbthen
  begin
    ComboBox1.ItemIndex := i;
    break;
  end;
end;
Nachtrag:
ComboBox1.ItemIndex := ComboBox1.Items.IndexOf('blubb');
  Mit Zitat antworten Zitat