Thema: Delphi ListView, Column Count?

Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#9

Re: ListView, Column Count?

  Alt 1. Mär 2005, 22:41
Delphi-Quellcode:
type
  TForm1 = class(TForm)
  private
    { Private declarations }
    function Foo: Integer;
  public
    { Public declarations }
  end;
Delphi-Quellcode:
function TForm1.Foo: Integer;
var
  i: Integer;
  cnt: Integer;
begin
  cnt := 0;
  for iLoop := 0 to Pred(ListView1.Items.Count) do
    if Listview1.Items[iLoop].SubItems[6] = '-1then
    begin
      Inc(cnt);
    end;
  end;
  result := cnt;
end;
StatusBar1.Panels[0].Text := 'Need: '+IntToStr(Foo);
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat