Determine cursor position in TWebBrowser in edit mode

I get the selection range like this:

var
  Range: IHTMLTxtRange;
begin
  if Supports((Document as IHTMLDocument2).selection.createRange,
    IHTMLTxtRange, Range)
end;

      

TWebBrowser being edited. I need to get the position of the cursor. How can I get it?

+2


source to share


1 answer


IHTMLTxtRange defines several attributes to get what you want.

But the key elements are boundingLeft and boundingTop



This link contains some information on how it works.

+1


source







All Articles