Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#2

Re: Listbox einträge Markieren

  Alt 7. Mär 2007, 15:50
Hi,

So ungefähr würd ichs machen

Delphi-Quellcode:
function MarkSearchResult(S: String): Integer;
var i: Integer;
    x: Integer;
begin
  for i:= 0 to ListBox1.Items.Count-1 do
  begin
    x := pos(S,ListBox1.Items[i]);
    if x = 0 then
      Result := i;
      ListBox1.ItemIndex := Result;
      exit;
    end;
  end;
end;
Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat