往另外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中添加当前选中的项目的更多相关文章
- WPF ListBoxItem模板中添加CheckBox选中问题
原文:WPF ListBoxItem模板中添加CheckBox选中问题 是这样的,需要一个ListBox来展示照片,并添加一个选中的CheckBox.这就需要对ListBox的ItemTemplate ...
- .NET winform 在listview中添加progressbar
找了好长时间没找到,后来索性自己写了一个: 首先,在往listview加载数据的事件里添加progressbar: foreach (string d in arr) { ; item = new L ...
- WPF: 在ListView中添加Checkbox列表
描述:ListView是WPF中动态绑定工具的数据容器,本文实现了一个在ListView中显示的供用户选择的列表项目,并且控制列表中选择的项目数量,即实现单选. XAML中创建ListView,代码如 ...
- winfrom如何在listview中添加控件
private Button btn = new Button(); private void Form1_Load(object sender, EventArgs e) { ListViewIte ...
- Delphi - 在ListView中添加一个进度条
// 相关定义 Type TListData = Record FileName: String; Percent: Integer; End; PListData = ^TListData; // ...
- ListView中添加ScrollView只显示一两行的问题
将ListView改为继承NoScrollListView package com.example.brtz.widget; import android.content.Context; impor ...
- Android ListView中添加不同的多种布局
最近做项目要使用ListView加载不同的布局,由于自己写的代码不能贴出,故找了一篇自认为比较好的blog给分享出来,希望对用到此项技术的同学有点帮助. http://logc.at/2011/10/ ...
- 在ListView中添加EditText丢失光标问题解决
<ListView android:id="@android:id/list" android:layout_height="fill_parent& ...
- Visual Stdio 无法直接启动带有“类库输出类型”的项目若要调试此项目,请在此解决方案中添加一个引用库项目的可执行项目。将这个可执行项目设置为启动项目!
j解决方法:项目-属性-应用程序-输出类型-Windows应用程序
随机推荐
- js监听鼠标滚动
//加载顺序问题,不可改变位置 var scrollFunc = function(e){ e = e || window.event; if (e.wheelDelta) { i ...
- PinchArea QML Type
PinchArea类型是在QtQuick 1.1中添加进去的.PinchArea是一个不可见的对象,常用在与一个可见对象连接在一起,为对应的可见对象提供手势操作.enabled属性被用来去设置绑定对象 ...
- WPF 分页控件 WPF 多线程 BackgroundWorker
WPF 分页控件 WPF 多线程 BackgroundWorker 大家好,好久没有发表一篇像样的博客了,最近的开发实在头疼,很多东西无从下口,需求没完没了,更要命的是公司的开发从来不走正规流程啊, ...
- Successfully installed matplotlib
Installing /usr/local/lib/python2.7/dist-packages/matplotlib-1.4.0-py2.7-nspkg.pthSuccessfully insta ...
- mvc Model元数据【学习笔记】
页面中Html.Editorfor(model=>model.fieldname)这些方法,都是通过Model的元数据来生成html的,我们如果想控制最终生成的html,可以通过修改元数据来实现 ...
- property测试代码:
// // main.m // TestVar2 // // Created by lishujun on 14-9-4. // Copyright (c) 2014年 lishujun. All r ...
- ASP 验证、查询AD域账户信息
'''函数功能:查询域用户信息 '''参数说明:strAdmin-域管理账户:Password-域帐户密码:Domain-域服务器. ''' ''' 参考资料:http://www.experts-e ...
- rm加转义很危险
rm -r 想转义一个空格字符,转得不对 -r, -R, --recursive 递归删除目录及其内容 连续rm了n个不想rm的文件夹.%>_<% 想起来以前有人也因为rm的失误把整个wo ...
- 【 POJ - 3801】Crazy Circuits(有源汇、上下界最小流)
Description You’ve just built a circuit board for your new robot, and now you need to power it. Your ...
- java 中的访问修饰符
一. public:所有类都可以访问 protected:所有子类和同包下的类都可以访问 缺省:同包类都可以访问 private:类本身才可以访问 注意点:protected修饰类属性时,例如 pac ...