Drag & Drop?

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Drag & Drop?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:10 pm

by pillick >> Thu, 1 Aug 2002 2:54:25 GMT

Hey, has anyone had any experience with implementing drag and drop sort of interfaces in jade? For instance, being able to drag items from one list box to another, maybe one on a different form?

Its a very powerful tool for making intuitive interfaces, so I'd be surprised if no-one has tried it... anyone?
Last edited by ConvertFromOldNGs on Wed Aug 12, 2009 10:08 am, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Drag & Drop?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:10 pm

by CarlRanson >> Thu, 1 Aug 2002 3:22:49 GMT

Its supported to a limited extent within jade forms.

"propper" drag and drop involves interaction with the shell api and is a lot harder to do.

CR
Last edited by ConvertFromOldNGs on Wed Aug 12, 2009 9:57 am, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Drag & Drop?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:10 pm

by allistar >> Thu, 1 Aug 2002 5:03:24 GMT

We use it quite a bit in our product. They are quite easy to
implement. You can implement dragging and dropping between any two
Jade controls, even if they are on different forms.

What I would like to see if for Jade controls to be able to respond to system drop events. E.g. it would be nice to be able to drop a file
from Windows Explorer into a Jade list box.

Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------
Last edited by ConvertFromOldNGs on Wed Aug 12, 2009 9:57 am, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Drag & Drop?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:10 pm

by johnmunro >> Thu, 1 Aug 2002 10:38:42 GMT
What I would like to see if for Jade controls to be able to respond to system drop events. E.g. it would be nice to be able to drop a file
from Windows Explorer into a Jade list box.

We would like this as well. In order to get Jade to accept files dropped from Explorer, we had to create an ActiveX control that only did that. It works, but it's a bit like using a hammer to open an egg...

--
John Munro
Synergist Limited - Home of FileVisionT
The Bioscience Innovation Centre
Cowley Road, Cambridge, UK
CB4 0DS
Telephone: +44 (0) 1223 478200
Fax: +44 (0) 1223 477969
Email: john.munro@filevision.com
Web: http://www.filevision.com
The contents of this communication are confidential and are only intended to be read by the addressee. We apologize if you receive this communication in error and ask that you contact Synergist Limited immediately to arrange for its return. The use of any information contained in this communication by an unauthorized person is strictly prohibited. Synergist Limited cannot accept responsibility for the accuracy or completeness of this communication as it is being transmitted over a public network. If you suspect this message may have been intercepted or amended, please inform Synergist Limited.
Last edited by ConvertFromOldNGs on Wed Aug 12, 2009 9:58 am, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Drag & Drop?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:10 pm

by pillick >> Fri, 2 Aug 2002 4:05:50 GMT

allistar, can you give me any pointers on how you did that?
Last edited by ConvertFromOldNGs on Wed Aug 12, 2009 9:59 am, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Drag & Drop?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:10 pm

by allistar >> Sun, 4 Aug 2002 22:25:11 GMT
allistar, can you give me any pointers on how you did that?

Let's ay you have two controls, one you want to drag from and one you want to drop to. These are "controlFrom" and "controlTo".

On controlFrom I put code in the mouseDown event:

dragMode := 1;

on controlTo I put code in the dragDrop event

objectGotDropped();

(That method does whatever you need to happen when the drop happens,
like changing the text of the control or adding an item to it (if it's
a list box or table)).

That is very simplified, and there are other ways of doing it. One
thing that we do is on the mouseDown event we begin a "one shot" timer set for 100ms, and when that timer fires we set the dragMode to 1. If
you get a mouseUp event before the timer fires, disable the timer (or
set a property to "true" wo that when the timer does fire you don't do anything). This is so you can distinguish between drags and normal clicks. When you are just clicking on the control you don't want the cursor to change to a "drag" cursor.

Hope this helps, the Jade help files are pretty good at explaining it.

Regards,
Allistar. ------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND

Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 31 guests

cron