|
Dear Paul,
I remember hearing of this before.
If all else fails you can attach an
eventhandler to the TwebBrowser or TEmbededWB that will "listen" for the
dragcomplete type events from the Twebbrowser.
You may have to experiment with the avaialable browser events
to see which is going to fire accurately to what you want, and you may need to
monitor and confirm a change in the TrichEdit (TCustomEdit.OnChange), so you
know that your browser event is related to a change in the
Trichedit.
(IE 5 and up?) - Both the [window.document] and
the [window.document.body] objects support these events:
| ondrag |
Fires on the source object continuously during a drag operation. |
| ondragend |
Fires on the source object when the user releases the mouse at the
close of a drag operation. |
| ondragenter |
Fires on the target element when the user drags the object to a valid drop target. |
| ondragleave |
Fires on the target object when the user moves the mouse out of a
valid drop target during a drag operation. |
| ondragover |
Fires on the target element continuously while the user drags the
object over a valid drop target. |
| ondragstart |
Fires on the source object when the user starts to drag a text
selection or selected object. |
| ondrop
|
There is a specific forum for Delphi and Twebbrowser and
TembeddedWB (search messages under "sink events" or like) :
(There you will find in their library/Files the units needed
to get events in the browser to report to Delphi, I thinks that you'll need to
register(free)/ log in first to access these.)
And
paul
Ph NZ 021 782 433 Fx NZ 021 292 2433
Overseas:
Ph. +6421782433 Fax +64212912433
P.O. Box 1005 Nelson 7015 New Zealand
----- Original Message -----
Sent: Wednesday, 1 September 2004 1:56
p.m.
Subject: [DUG] dragging between
tWebBrowser & tRichEdit
Hi
I have an application that allow a user to drag
information from a WebBrowser component to a RichEdit component.
The actual information transfer
occurs without any problems at all. However, the application needs
to record the URL of the source webpage, and I can't find a way to alert
the it to the fact that the drag-and-drop event has occurred.
I thought I could use the onDragDrop event
that tRichEdit inherits from tControl, but it doesn't fire (nor does
onEndDrag). There are Delphi examples for those events in the Help
system, and they work fine, but not when I try to apply them to my
application.
The tRichEdit and the tWebBrowser components are
both created dynamically, but I know to assign the event handler
procedure to the event name (e.g. onDragDrop := recordSourceURL), so that
isn't the problem...
_________
Paul Lyons _________
_______________________________________________ Delphi mailing
list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
--- Outgoing mail is certified Virus Free. Checked by AVG
anti-virus system ( http://www.grisoft.com). Version: 6.0.747
/ Virus Database: 499 - Release Date: 1/09/2004
|