Page 1 of 1

[Bug?] Setting cursor to crHandPoint does not work

Posted: Mon Sep 17, 2018 7:14 am
by 16583754
I try to set the cursor to crHandPoint when the mouse moves over the chart:

Code: Select all

void __fastcall TForm3::Chart1MouseMove(TObject *Sender, TShiftState Shift, int X, int Y)
{
  Chart1->Cursor=crHandPoint;
}
However, the mouse will briefly change to crHandPoint then it will immediately return to crDefault.

--------

Update:
Also this will not work:

Code: Select all

void __fastcall TForm3::btnTestClick(TObject *Sender)
{
   Chart1->Cursor=crHandPoint;
}

Re: [Bug?] Setting cursor to crHandPoint does not work

Posted: Tue Sep 18, 2018 7:06 am
by yeray
Hello,

Try setting CancelMouse property after setting the Cursor:

Code: Select all

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  Chart1.Cursor:=crHandPoint;
  Chart1.CancelMouse := True;
end;