鼠标移动到cxGrid的单元格上时,弹出dxCalloutPopup面板

学习大师原创文档,请勿转载,侵权必究。


procedure TForm3.cxGrid1DBTableView1MouseDown(Sender: TObject;

   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

   HitTest:TcxCustomGridHitTest;

   ASite: TcxGridSite;

begin

   if Sender is TcxGridSite then

   begin

    ASite := Sender as TcxGridSite;

    HitTest := ASite.GridView.GetHitTest(ASite.ScreenToClient(GetMouseCursorPos));

    if Assigned(HitTest) then

      if HitTest is TcxGridRecordCellHitTest then

        if TcxGridRecordCellHitTest(HitTest).Item.Index = 1 then

          dxCalloutPopup1.Popup(ASite, TcxGridRecordCellHitTest(HitTest).ViewInfo.Bounds);

   end;

end;

联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678