trichview.com

trichview.support




Re: drag files code?


Return to index


Author

Message

Sergey Tkachenko

Posted: 03/21/2005 20:36:16


> >It's not possible to enable this effect without a real d&d.

>

> Hi Sergey,

>

> I already have the drag and drop working fine. I drag text from one part

> of my application and drop it into RVE fine.

>

> However, my inserted text always appears at current caret position. I want

> text to appear at 'dropped' position (or closest). I would love to use use

> the technique you have implemented for dropping files.


You see - your implementation does not satisfy you.

You can use the technique shown in Demos\Delphi\Assorted\Graphics\DragImg\

to move the caret after the mouse pointer. But in this way you move a real

caret (not its drag&drop simulation).


>

> Is this possible? Can you provide hint or will I have to work through

TRichView

> source code myself? I don't want to to work through your source code if

you

> tell me it is not possible. If it is not possible to use technique you use

> for dropping files I will write new code for myself.


When dragging files (or other content) over the editor, the editor

1) hides the real caret

2) draws its simulation (not blinking, visible even if the editor is not in

focus)

It's not possible to display this caret in RichViewEdit without initiating a

real (OLE) drag&drop.

Well, you can choose a hard way drawing this caret yourself.

But using the TDropTextSource component (see my previous reply), you can do

it with couple simple lines of code.

Just place it in form, register some visible component as a dragging source

for it, assign text to property.

Dragging your text will look exactly like dragging files.





Powered by ABC Amber Outlook Express Converter