zoukankan      html  css  js  c++  java
  • 請問各位大大,我要將listview顯示的縮圖加入到listview2,請問該如何做呢

    請問各位大大,我要將listview顯示的縮圖加入到listview2,請問該如何做呢?
    下面的function可以將listview的縮圖加到listview2但是全都顯示listview1第一張的圖片,但是檔名是確定的,只是顯示的圖片都是第一張。

    function MoveLvItem(lvOrig,lvdest:TlistView;checked:boolean=false):string;
    var i,j:integer;
    itemlist:TObjectlist;
    listitem,newlistitem:TListItem;
    begin
    ItemList:=TObjectList.Create(false);
    if not checked then
    begin
    for i:=lvOrig.Selected.Index to lvOrig.Items.Count -1 do
    begin
    if lvorig.Items[i].Selected then ItemList.Add(lvorig.Items[i]);
    end;
    end
    else
    begin
    for i:=0 to lvorig.Items.Count -1 do
    begin
    if lvorig.Items[i].Checked then itemlist.Add(lvorig.Items[i]);
    end;
    end;
    for i:=0 to itemlist.Count -1 do
    begin
    listitem:=itemList[i] as TlistItem;
    newlistitem:= lvdest.Items.Add;
    newlistitem.Caption:=listitem.Caption;
    for j:= 0 to listitem.SubItems.Count -1 do
    begin
    newlistitem.SubItems.Add(listitem.SubItems[j]);
    end;
    end;
    result:=(itemList[0] as TListItem).Caption;
    (ItemList[0] as TlistItem).Delete;
    for i:= 1 to ItemList.Count -1 do
    begin
    result:=Result +','+(Itemlist[-1] as TListItem).Caption;
    (ItemList[1] as TListItem).Delete;
    end;
    ItemList.Free;
    end;

  • 相关阅读:
    u盘的超级用法
    文件夹访问被拒绝
    web移动前端的click点透问题
    call()apply()ind()备忘录
    Safari中的new Date()格式化坑
    dataURI V.S. CSS Sprites 移动端
    css3属性之 box-sizing
    多人协作代码--公共库的引用与业务约定
    web前端本地测试方法
    依赖包拼合方法
  • 原文地址:https://www.cnblogs.com/blogpro/p/11446528.html
Copyright © 2011-2022 走看看