views:

244

answers:

1

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?

A: 

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.

Robert Love
I need find position cursor in characters from begin of string.Not coordinante in pixel.
cemick
Do you need visible characters or source characters?
NineBerry
visible, not html source
cemick