Semyon.Khmelev
Semyon.Khmelev

Reputation: 197

Detect cursor position in TWebBrowser at edit mode

I get selection range like this:

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

TWebBrowser in editing. I need get position of cursor. How I can get its?

Upvotes: 3

Views: 1781

Answers (1)

Robert Love
Robert Love

Reputation: 12581

IHTMLTxtRange defines several attributes to get what you need.

But the key items are boundingLeft and boundingTop

This link has some details on how it works as well.

Upvotes: 1

Related Questions