改为:
   if Button = mbRight then begin
     if TreeView1.GetNodeAt(X, Y)<>Nil then begin
       TreeView1.GetNodeAt(X, Y).Selected := true;
       PopupMenu1.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
     end;
   end;

转载于:https://www.cnblogs.com/lzj1981/archive/2013/04/29/3050545.html

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐