易
易名烦
Unregistered / Unconfirmed
GUEST, unregistred user!
var
list:tlistitem;
f:file of byte;
s:string;
begin
IF OPENDIALOG2.Execute THEN
begin
list:=tlistitem.Create(listview1.Items);
list.Caption:=extractfilename(opendialog2.FileName);
list.SubItems.Add(extractfilepath(opendialog2.FileName));
assignfile(f,opendialog2.FileName);
reset(f);
list.SubItems.Add(inttostr(filesize(f)));
closefile(f);
listview1.Items.AddItem(list,);
end
为什么加入LISTVIEW后第一列为空(看不见),其它列则可见!也就是CAPTION这一系不可见!
list:tlistitem;
f:file of byte;
s:string;
begin
IF OPENDIALOG2.Execute THEN
begin
list:=tlistitem.Create(listview1.Items);
list.Caption:=extractfilename(opendialog2.FileName);
list.SubItems.Add(extractfilepath(opendialog2.FileName));
assignfile(f,opendialog2.FileName);
reset(f);
list.SubItems.Add(inttostr(filesize(f)));
closefile(f);
listview1.Items.AddItem(list,);
end
为什么加入LISTVIEW后第一列为空(看不见),其它列则可见!也就是CAPTION这一系不可见!