请问:如何实现listbox的拖动操作? 查查ondrop事件的help,帮助中有例子的。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 给你一个例子比如窗体上有两个Listbox,下面将Listbox2中的项目拖到ListBox1中将两个Listbox的DragMode属性设为dmAutomatic.拖放经过事件procedure TForm1.ListBox1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);begin if TListBox(Source)=ListBox2 then Accept:=true;end;//拖放落下事件procedure TForm1.ListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);begin ListBox1.Items.Add(Listbox2.Items[ListBox2.ItemIndex]);end; ???请问网通电脑如何ping 通铁通电脑??? 如何写动态数组宣告方式及使用方式? pngImage可以实现鼠标移上去动态缩放图标的功能吗? 高分求解基本算法,DbGrid中某一条件下,CELL单元格颜色设置问题。。 盼大家分析控件、类! 问题 对delphi vcl库扩展 如何将acm控件改成delphi7的 delphi屏幕截取用udpclient udpserver做的分包发送 接收的完整代码,急需 button中的文字能否竖着显示啊? cxlookupcombobox 如何定位到所需的选项? 如何测试内存泄漏(在delphi中) 请各位谈谈TACTIONLIST的用法,最好有实例。
比如窗体上有两个Listbox,下面将Listbox2中的项目拖到ListBox1中
将两个Listbox的DragMode属性设为dmAutomatic.拖放经过事件
procedure TForm1.ListBox1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
if TListBox(Source)=ListBox2 then
Accept:=true;
end;//拖放落下事件
procedure TForm1.ListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
begin
ListBox1.Items.Add(Listbox2.Items[ListBox2.ItemIndex]);
end;