首页 > 其他 > 详细

delphi 在 DragDrop 的时候,滚动 TreeView

时间:2014-08-01 12:47:01      阅读:423      评论:0      收藏:0      [点我收藏+]

在 DragDrop 的时候,滚动 TreeView

当高度不够的时候
bubuko.com,布布扣
 
 
procedure TForm1.TreeView1DragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
  if (y < 15) then
   {On the upper edge - should scroll up }
     SendMessage(TreeView1.Handle, WM_VSCROLL, SB_LINEUP, 0)
  else if (TreeView1.Height - y < 15) then
   { On the lower edge - should scroll down }
      SendMessage(TreeView1.Handle, WM_VSCROLL, SB_LINEDOWN, 0);
 
 
 
    Accept := Source = Sender;
    if not Accept then exit;
end;




delphi 在 DragDrop 的时候,滚动 TreeView,布布扣,bubuko.com

delphi 在 DragDrop 的时候,滚动 TreeView

原文:http://www.cnblogs.com/xe2011/p/3884405.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!