Q QSmile Unregistered / Unconfirmed GUEST, unregistred user! 2006-08-07 #1 我的程序中有一个 ListView .我需要它能接受用户拖过来的文件.同时也能把里面的东东,拖出去.这样如何做? 是不是要重写一个 ListView 类?
D dey-999 Unregistered / Unconfirmed GUEST, unregistred user! 2006-08-16 #2 1.显示接受光标 procedure TZ_hjgl.listview1DragOver(Sender, Source: TObject; X,Y: Integer; State: TDragState; var Accept: Boolean); begin Accept := true; end; 2.填写接受代码 procedure TZ_hjgl.GridDragDrop(Sender, Source: TObject; X, Y: Integer); var SdrLst,SrcLst: TListView; begin SdrLst := (Sender as TListView); SrcLst := (Source as TListView); ... end;
1.显示接受光标 procedure TZ_hjgl.listview1DragOver(Sender, Source: TObject; X,Y: Integer; State: TDragState; var Accept: Boolean); begin Accept := true; end; 2.填写接受代码 procedure TZ_hjgl.GridDragDrop(Sender, Source: TObject; X, Y: Integer); var SdrLst,SrcLst: TListView; begin SdrLst := (Sender as TListView); SrcLst := (Source as TListView); ... end;
J jfyes Unregistered / Unconfirmed GUEST, unregistred user! 2006-08-16 #3 uses SHellAPI; 接受文件要 SHellAPI.DragAcceptFiles(self.Handle, True); DragQueryFile
Q QSmile Unregistered / Unconfirmed GUEST, unregistred user! 2006-08-16 #4 难点不是把文件拖进来。而是把文件拖到 Explorer 中去如何办?
J jfyes Unregistered / Unconfirmed GUEST, unregistred user! 2006-08-17 #5 http://dev.csdn.net/develop/article/21/21115.shtm type TDragAndDropOLE=Class(TObject,IUnknown,IDropTarget) 基于COM的拖放技术 http://hubdog.csdn.net/Hubdog/comdd.htm
http://dev.csdn.net/develop/article/21/21115.shtm type TDragAndDropOLE=Class(TObject,IUnknown,IDropTarget) 基于COM的拖放技术 http://hubdog.csdn.net/Hubdog/comdd.htm
J jfyes Unregistered / Unconfirmed GUEST, unregistred user! 2006-08-17 #6 http://www.arrakis.es/~qkysoft/pdf_data/grahame/dnd.doc hubdog 好像是翻这个的, 这里很详细,只不是英文的。
Q QSmile Unregistered / Unconfirmed GUEST, unregistred user! 2006-08-18 #7 拖入比较容易.拖出就难了 还好,我在2ccc.com 上找到了一个控件.很不错的. DragDrop