Items are laid out in one row in TListView when ViewStyle:=vsIcon or vsSmallIcon
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
var LV : TListView; I:integer;
begin
LV:=TListView.Create(Self);
LV.Parent:=Self;
LV.Top:=10;
LV.Left:=10;
LV.ViewStyle:=vsSmallIcon;
for I:=0 to 10 do
LV.AddItem('Item',nil);
end;
end.
How to make them laying out in rows and columns?