Change Cursor when passing over a table

General TRichView support forum. Please post your questions here
Post Reply
fara2000
Posts: 42
Joined: Mon Sep 07, 2015 5:59 pm

Change Cursor when passing over a table

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Change Cursor when passing over a table

Post 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;
fara2000
Posts: 42
Joined: Mon Sep 07, 2015 5:59 pm

Re: Change Cursor when passing over a table

Post 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?
Post Reply