Delphi:TListView组件使用方
来源:优易学  2011-9-10 17:49:47   【优易学:中国教育考试门户网】   资料下载   IT书店
  引用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;

责任编辑:小草

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训