Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I Cant figure out drag and drop!

Posted on 1998-09-26
4
Medium Priority
?
178 Views
Last Modified: 2010-04-06
Can anyone explain to me how to use drag and drop within a delphi program.
thanks in advance.
Mike Ross
0
Comment
Question by:mykyl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1340877
Tell me your e-mail address and I'll send you some code....
0
 
LVL 10

Accepted Solution

by:
viktornet earned 100 total points
ID: 1340878
Here is the code but anyway, if you need the project tell me your e-mail address and I'll send ya somethin'
-----------------
ListBox1, and ListBox2 are TListBox 'es
//Set listbox1.DragMode := dmAutomatic;

procedure TForm1.ListBox2DragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
  Accept := Sender is TListBox;
end;

procedure TForm1.ListBox2DragDrop(Sender, Source: TObject; X, Y: Integer);
var
  str : string;
begin
  str := listbox1.items[listbox1.itemindex];
  if listbox2.items.indexof(str) < 0 then
    listbox2.items.add(str);
end;
-----------

Regards,
Viktor Ivanov
0
 

Author Comment

by:mykyl
ID: 1340879
My email address is
mike @viprocess.ndirect.co.uk
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1340880
Does it work now???

//Viktor
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question