TDBGrid控件没有OnMouseDowns事件,如何在TDBGrid中实现拖放?(100分)

Z

zodiac

Unregistered / Unconfirmed
GUEST, unregistred user!
要实现将TDBGrid种的一行(Row)拖到另一个控件中.如果将DragMode设为
Automatic,则无法用鼠标单击选择行.如果设为Manual,发现TDBGrid控件
没有OnMouseDown事件.如何实现拖动?
 
继承一个TDBGrid, 加上OnMouseDown事件吧
 
看来只能自己写dbgrid了!
 
在本unit中,自定义TMyCustomDBGrid=class(TCustomDBGrid),
再如下引用: TMyCustomDBGrid(DBGrid1).MouseDown(...)
或 (DBGrid1 as TMyCustomDBGrid).MouseDown(...)
即可
 
多人接受答案了。
 
顶部