TListView组件使用方法
敬业的IT人
互联网
佚名
2008-1-4 16:19:09
引用CommCtrl单元procedure TForm1.Button1Click(Sender: TObject);begin ListView_DeleteColumn(MyListView.Handle, i);//i是要删除的列的序号,从0开始end;用LISTVIEW显示表中的信息:
procedure viewchange(listv:tlistview;table:tcustomadodataset;var i:integer);
begin
tlistview(listv).Items.BeginUpdate; {listv:listview名}
try
tlistview(listv).Items.Clear;
with table do {table or query名}
begin
active:=true;
first;
while not eof do
begin
listitem:=tlistview(listv).Items.add;
listitem.Caption:=trim(table.fields[i].asstring);
// listitem.ImageIndex:=8;
next;
end;
end;
finally
tlistview(listv).Items.EndUpdate;
end;
end;
procedure viewchange(listv:tlistview;table:tcustomadodataset;var i:integer);
begin
tlistview(listv).Items.BeginUpdate; {listv:listview名}
try
tlistview(listv).Items.Clear;
with table do {table or query名}
begin
active:=true;
first;
while not eof do
begin
listitem:=tlistview(listv).Items.add;
listitem.Caption:=trim(table.fields[i].asstring);
// listitem.ImageIndex:=8;
next;
end;
end;
finally
tlistview(listv).Items.EndUpdate;
end;
end;
- 最新文章
- 正确看待《Delphi高手突破》最后一章的实例[01-04]
- kmp模式匹配算法的pascal实现[01-04]
- 最酷的程序员用KOL[01-04]
- 如何将C/C 程序转译成Delphi(七)[01-04]
- 发现:不要Excel也可生成xls文件[01-04]
- Self-Delete程序之Delphi版本,终于搞定了。[01-04]
- 相关文章
- Delphi中根据分类数据生成树形结构的最优方法[01-04]
- 一个画渐变的方法[01-04]
- 用两种方法快速简单的实现窗口淡入淡出[01-04]
- 关于中文折行及相关问题的解决方法[01-04]
- 在Delphi中编写控件的基本方法[01-04]
- 代替showmodal其他两种方法[01-04]
