Drag n drop function for form memo field

G

Gina

Hi all.

I would like to have the drag n drop function working on a single memo field
on a form.
my idea is that the user should be allowed to mark a part of text and drag
and drop it within that memo field rather than cut and paste it via
clipboard

searching through posts here didn't give me a hint on how to start this

maybe someone can give me a link or a piece of code ?

thanks in advance
Gina
 
R

Ron Weiner

Gina

You will need to replace the standard Access text box with a Rich Text
Active X control to get Drag Drop capability. You can use Msoft one you
likely already have on you machine, or get a free one from Stephen Lebans
here http://www.lebans.com/richtext.htm, or a Commercial one from FMS here
http://www.fmsinc.com/products/memo/index.html

The only Down Side to doing this is the extra support you will have to
provide to install your application. You will be responsible for creating
an install package that insures whatever control you provide is installed in
the client machine. You may also leave yourself open for "Feature Creep".
Feature Creep is when clients find new and exciting ways to use the
application in a way you never imagined. For instance in addition to being
able to drag drop text into your app they might soon "discover" that they
can drop "Other Stuff" in there too. You should be prepared to spend a fair
amount of time to make sure all of this will not affect the rest of your
app.

Good luck with your project

Ron W
http://www.worksrite.com
 
G

Gina

Thanks first of all for your help and links...
i've added the RTF2.ocx to my project
I've spend some time now on trying to use it the way the memofield was used
before ..... the memofield is a field of a table and the form just reflects
that field.

I cannot type into the RTF field
and so I cannot get it to work as intended :((

i am using A2k ... and think I probably better forget about this nice little
playing around ?!??
I thought I could use code like

Function DragDrop1(mousePos X, mousePos y, startSelection, endSelection
.....)
.....
End Function

and thought I could take it from there ....

I can't ... can I ???

Gina
 
R

Ron Weiner

Not sure why you can't edit text in the rich text control, but something is
obviously wrong. I do not believe that you would need to write any code to
get the drag drop stuff to work.

Ron W
www.WorksRite.com
 
G

Gina

Hi Ron.

Just have seen that you answerd this one as well.

well .... I do not know what I could have done wrong .... included the ocx
into my app ....
added a new actx control (RTF2) then I call formview and see the RTF2
control showing:

RTF2 control design view window

the upcoming text I can drag and drop but cannot edit anything

actually, don't have a clou

Gina
 
S

Stephen Lebans

The RTF control supports Drag and Drop but Access does not. Simply put,
Access Forms/Controls do not expose a Drag and Drop event. You can Drag
and Drop from other applications and the Window's File system to the
RTF2 control because Access is not directly involved in the transfer
process.

In reference to your inability to use the control, RTF2 must be directly
bound to the Memo field in question. Open the Property sheet for the
RTF2 control and set the Data Source to your Memo field. In this sense
there is no difference between the native TextBox control and the RTF2
ActiveX control.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top