Page 1 of 1

Change Cursor when passing over a table

Posted: Tue Nov 23, 2021 9:26 pm
by fara2000
Hello
How can I change the cursor to crHandpoint when the mouse is over a table inside richviewedit page???
When the mouse cursor leaves the table the cursor return to default!
Thanks in advance

Re: Change Cursor when passing over a table

Posted: Wed Nov 24, 2021 6:29 am
by Sergey Tkachenko
Use OnGetItemCursor event:

Code: Select all

procedure TForm1.rveGetItemCursor(Sender: TCustomRichView;
  RVData: TCustomRVData; ItemNo: Integer; var Cursor: TCursor);
begin
  if (RVData.GetItem(ItemNo) is TRVTableItemInfo) or (RVData.GetRVData is TRVTableCellData) then
    Cursor := Sender.Style.JumpCursor;
end;

Re: Change Cursor when passing over a table

Posted: Wed Nov 24, 2021 12:40 pm
by fara2000
Yes it works when the mouse is over the table.
I still need to get the original cursor back when leaving the table!!
What do you think?