unit
Unit1;
interface
uses
System
.
SysUtils,
Vcl
.
Controls,
Vcl
.
Forms,
CommCtrl,
ComCtrls;
type
TForm1 =
class
(TForm)
procedure
FormCreate(Sender: TObject);
procedure
FormDestroy(Sender: TObject);
private
public
end
;
var
Form1: TForm1;
ListView1: TListView;
ListItem1: TListItem;
implementation
{$R *.dfm}
procedure
TForm1
.
FormCreate(Sender: TObject);
begin
form1
.
Height :=
115
;
form1
.
Width :=
350
;
form1
.
Position := poScreenCenter;
form1
.
Caption :=
'Subitems[2] in 255 characters'
;
ListView1 := TListView
.
Create(Self);
with
ListView1
do
begin
Parent := Self;
Align := alClient;
ViewStyle := vsReport;
BorderWidth :=
2
;
GridLines :=
true
;
end
;
with
ListView1
.
Columns
do
begin
Add
.
Caption :=
'Line № '
;
Add
.
Caption :=
'Error '
;
Add
.
Caption :=
'String '
;
end
;
try
ListView1
.
Items
.
BeginUpdate;
ListItem1 := ListView1
.
Items
.
Add;
ListItem1
.
Caption :=
'22421 '
;
ListItem1
.
SubItems
.
Add(
'All Columns '
+ IntToStr(ListView1
.
Columns
.
Count));
ListItem1
.
SubItems
.
Add(
'<RHINOSTRING English="Exploding this mesh will create %d individual meshes. This may be more than your system can safely manage using the available memory. You can use Weld to make the mesh explode into fewer pieces, or see Help for more information.\n\nClick OK to proceed with Explode, or Cancel to leave the mesh as is.[[24836]]" Localized="Exploding this mesh will create %d individual meshes. This may be more than your system can safely manage using the available memory. You can use Weld to make the mesh explode into fewer pieces, or see Help for more information.\n\nClick OK to proceed with Explode, or Cancel to leave the mesh as is.[[24836]]" />'
);
ListView1
.
Columns[
0
].Width :=
LVSCW_AUTOSIZE_USEHEADER;
ListView1
.
Columns[
1
].Width :=
LVSCW_AUTOSIZE_USEHEADER;
ListView1
.
Columns[
2
].Width := LVSCW_AUTOSIZE
;
finally
ListView1
.
Items
.
EndUpdate;
end
;
end
;
procedure
TForm1
.
FormDestroy(Sender: TObject);
begin
FreeAndNil(ListView1);
end
;
end
.