cxgrid HyperLink 鼠标显示效果

procedure TForm1.cxGrid1DBTableView1MouseMove(Sender: TObject;
  Shift: TShiftState; X, Y: Integer);
var
  Ht: TcxCustomGridHitTest;
begin
  Ht := TcxGridSite(Sender).GridView.Viewinfo.GetHitTest(X,Y);
  If (Ht is TcxGridRecordCellHitTest) and
   (TcxGridRecordCellHitTest(Ht).Item.Properties is TcxHyperLinkEditProperties) then
    Screen.Cursor := crHandPoint
  else
    Screen.Cursor := crDefault;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if Screen.Cursor <> crDefault then
     Screen.Cursor := crDefault;
end;
posted @ 2014-07-18 13:54  不能失败  阅读(510)  评论(0编辑  收藏  举报