//往另外1个ListView中添加当前选中的项目
 

function
AddSelItems(listview1:TListView;ListView2:TListView):Boolean;
var
  s: string;
  I: Integer;
begin
  Result:=False;
  if listview1.Selected =nil then  exit;
  for i := 0 to
listview1.items.count - 1
do
  begin
    if listview1.items[i].selected then
       ListView2.Items.Add.Caption:=listView1.Items[i].Caption;
  end;
  Result:=True;
end;
 
procedure TForm1.Button1Click(Sender:
TObject);
begin
     AddSelItems(ListView1,ListVIew2);
end;

往另外1个ListView中添加当前选中的项目的更多相关文章

  1. WPF ListBoxItem模板中添加CheckBox选中问题

    原文:WPF ListBoxItem模板中添加CheckBox选中问题 是这样的,需要一个ListBox来展示照片,并添加一个选中的CheckBox.这就需要对ListBox的ItemTemplate ...

  2. .NET winform 在listview中添加progressbar

    找了好长时间没找到,后来索性自己写了一个: 首先,在往listview加载数据的事件里添加progressbar: foreach (string d in arr) { ; item = new L ...

  3. WPF: 在ListView中添加Checkbox列表

    描述:ListView是WPF中动态绑定工具的数据容器,本文实现了一个在ListView中显示的供用户选择的列表项目,并且控制列表中选择的项目数量,即实现单选. XAML中创建ListView,代码如 ...

  4. winfrom如何在listview中添加控件

    private Button btn = new Button(); private void Form1_Load(object sender, EventArgs e) { ListViewIte ...

  5. Delphi - 在ListView中添加一个进度条

    // 相关定义 Type TListData = Record FileName: String; Percent: Integer; End; PListData = ^TListData; // ...

  6. ListView中添加ScrollView只显示一两行的问题

    将ListView改为继承NoScrollListView package com.example.brtz.widget; import android.content.Context; impor ...

  7. Android ListView中添加不同的多种布局

    最近做项目要使用ListView加载不同的布局,由于自己写的代码不能贴出,故找了一篇自认为比较好的blog给分享出来,希望对用到此项技术的同学有点帮助. http://logc.at/2011/10/ ...

  8. 在ListView中添加EditText丢失光标问题解决

    <ListView    android:id="@android:id/list"     android:layout_height="fill_parent& ...

  9. Visual Stdio 无法直接启动带有“类库输出类型”的项目若要调试此项目,请在此解决方案中添加一个引用库项目的可执行项目。将这个可执行项目设置为启动项目!

    j解决方法:项目-属性-应用程序-输出类型-Windows应用程序

随机推荐

  1. 我的接口框架---框架函数文件common.php

    <?php defined('JDHU') OR die('no allow access'); /** * 加载配置文件 */ function &get_config($replac ...

  2. memcached在windows安装

    下载地址: http://s3.amazonaws.com/downloads.northscale.com/memcached-win64-1.4.4-14.ziphttp://s3.amazona ...

  3. git 基础命令

    1.git init git 初始化仓库 2.git add . git 添加全部文件 3.git add xxx.txt   git 添加单独文件 4.git commit -m "提交的 ...

  4. pragma指令简介

    整理日:2015年3月12日 资源来来自己网络 在编写程序的时候,我们经常要用到#pragma指令来设定编译器的状态或者是指示编译器完成一些特定的动作. 下面介绍了一下该指令的一些常用参数,希望对大家 ...

  5. windows相关小知识

    获得本机MAC1 快捷键win+R打开运行窗口, 输入cmd回车进入控制台2 输入ipconfig -all  找到本地连接中的物理地址 根据IP获得MAC方法:1 进入cmd控制台,执行:ping ...

  6. Hust 1231 Coin

    题目链接 题意: 亮亮有N个有瑕疵的硬币,有瑕疵意味着抛一枚硬币正面向上的概率 不等于 反面向上的概率 也即概率不等于0.5. 现在亮亮一次抛N个硬币 , 恰好有K个硬币正面向上 ,接着他又想抛一次 ...

  7. BZOJ 4052 Magical GCD

    Description 给出一个长度在\(100000\)以内的正整数序列,大小不超过\(10^{12}\).求一个连续子序列,使得在所有的连续子序列中,它们的GCD值乘以它们的长度最大. Input ...

  8. 测试WWW方案(反向代理,负载均衡,HTTP加速缓存)

    大约图如下: NGINX FRONT(80)--->VARNISH(8080)---->LNMP BACKEND 1(80) |--->LNMP BACKEND 2(80) 主要是前 ...

  9. 居然还有WM_TIMECHANGE(只在用户手动改变系统时间时才会产生作用)

    unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ...

  10. PHP+MYSQL实现输出打印数据库表结构和输出表内容

    效果图1 <form id="form1" name="form1" action="2.php" method="get& ...