在DragDrop的时候,滚动TreeView

字体大小: 中小 标准 ->行高大小: 标准
在DragDrop的时候,滚动TreeView?

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);

end;

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/68511.html