In a form I use TSRichViewEdit V. 9
The function GetItemAt returns wrong corrdinates and therefore does not return the item under the mouse pointer. I have already tried all possible combinations like:
minus PageProperty.LeftMargin and PageProperty.TopMargin
and/or
minus the coordinates of srv.GetPageClientRect(PageNo);
but I can't find the appropriate item under the mouse cursor. It even doesn't work if the zoom factor is <> 100?
How can I reliably find the item that is under the mouse pointer?
TSRichView - GetItemAt returns wrong corrdinates
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: TSRichView - GetItemAt returns wrong corrdinates
SRichViewEdit.GetItemAt must work (but not SRichViewEdit.RichViewEdit.GetItemAt).
See the example in <TRichView Dir>\ScaleRichView\Demos\Delphi\CustomDraw\Rectangles\DrawAtCursor\
This demo highlights an item below the mouse pointer.
See the example in <TRichView Dir>\ScaleRichView\Demos\Delphi\CustomDraw\Rectangles\DrawAtCursor\
This demo highlights an item below the mouse pointer.
Re: TSRichView - GetItemAt returns wrong corrdinates
Jippie - that works - thnaks a lot!