Hi,

  I am having problems with the DHTML Edit control when using it from
Delphi. Basically I can get all things to work, but I am unable to
drag/drop from another control to the Edit Control or position the caret.

I also can not use this code which is contained in the docs, and faq.

Dynamically Moving the Insertion Point
You can set the location of the insertion point programmatically using
TextRanges. The following Visual Basic code demonstrates how to set the
insertion point at the end of the document:

Private Sub MoveToEnd()
    Dim range As IHTMLTxtRange

    Set range = DHTMLEdit1.DOM.body.createTextRange()
    range.collapse False
    range.Select
End Sub

Viewing the object tree from VB the body property does not have a
createTextRange method.

The Body is a IHTMLElement whereas the createTextRange method is part of
IHTMLBodyElement.

So I don't know what to do to fix this.

I also want to drop from another delphi control some HTML and the HTML to
be inserted at the position of the mouse in the DHTML edit control.

How can I do this? The VB sample does not compile on my machine, heaps of
load errors when opening the project, and so I do not know if the control is
setup to do the drag drop.

The VB source when dragging uses OLEDragStart, which Delphi does not have,
so is there any way I can implement drag & drop like the VB sample does?

Any help would be appreciated.

Chris

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to