Does Anyone Know How To Drag And Drop? 
Author Message
 Does Anyone Know How To Drag And Drop?

Hello,

Does anyonone understand the finer points of Drag-and-Drop events and methods?

Here's is my problem:

I have a list that I want the user to be able to drag to another window.
But I don't want to drag the text of the list, I want to drag the
ItemData.

The ItemData contains id information that I need for the drop to work properly.

If anyone knows how to do this, please let me know.

Regards,
Mike



Tue, 23 Jan 2001 03:00:00 GMT  
 Does Anyone Know How To Drag And Drop?

Quote:
>Hello,

>Does anyonone understand the finer points of Drag-and-Drop events and methods?

>Here's is my problem:

>I have a list that I want the user to be able to drag to another window.
>But I don't want to drag the text of the list, I want to drag the
>ItemData.

>The ItemData contains id information that I need for the drop to work properly.

>If anyone knows how to do this, please let me know.

>Regards,
>Mike

When you drop, you can use Source.ItemData.


Tue, 23 Jan 2001 03:00:00 GMT  
 Does Anyone Know How To Drag And Drop?

Quote:


> >Hello,

> >Does anyonone understand the finer points of Drag-and-Drop events and
methods?

> >Here's is my problem:

> >I have a list that I want the user to be able to drag to another window.
> >But I don't want to drag the text of the list, I want to drag the
> >ItemData.

> >The ItemData contains id information that I need for the drop to work
properly.

> >If anyone knows how to do this, please let me know.

> >Regards,
> >Mike

> When you drop, you can use Source.ItemData.

I don't understand. What is Source.ItemData refering to?

Could you give me an example?

Thanks,
Mike



Tue, 23 Jan 2001 03:00:00 GMT  
 Does Anyone Know How To Drag And Drop?


Quote:
>Hello,

>Does anyonone understand the finer points of Drag-and-Drop events and methods?

>Here's is my problem:

>I have a list that I want the user to be able to drag to another window.
>But I don't want to drag the text of the list, I want to drag the
>ItemData.

>The ItemData contains id information that I need for the drop to work properly.

You don't need to put ID information in the ItemData array to get
DragDrop to work. Please clarify what you are trying to do.

--
Richard Mason



Thu, 25 Jan 2001 03:00:00 GMT  
 Does Anyone Know How To Drag And Drop?

Quote:



> >Hello,

> >Does anyonone understand the finer points of Drag-and-Drop events and
methods?

> >Here's is my problem:

> >I have a list that I want the user to be able to drag to another window.
> >But I don't want to drag the text of the list, I want to drag the
> >ItemData.

> >The ItemData contains id information that I need for the drop to work
properly.

> You don't need to put ID information in the ItemData array to get
> DragDrop to work. Please clarify what you are trying to do.

The list contains names. The ItemData contains primary keys to a database table.

When the user drags the names, I want the ItemData to be dragged so that
when the user drops, I can have access to the primary keys. Then I can run
queries.

Right now I am getting the Text not the ItemData.

The drag and drop works just fine. I just want to somehow drag and drop
the ItemData not the Text.

Thanks for any help.

Mike



Sun, 28 Jan 2001 03:00:00 GMT  
 Does Anyone Know How To Drag And Drop?


Quote:
>The list contains names. The ItemData contains primary keys to a database
>table.

>When the user drags the names, I want the ItemData to be dragged so that
>when the user drops, I can have access to the primary keys. Then I can run
>queries.

>Right now I am getting the Text not the ItemData.

>The drag and drop works just fine. I just want to somehow drag and drop
>the ItemData not the Text.

I've just posted to another thread "Drag and Drop" in this newsgroup and
in the lstDest_DragDrop event code changing one line would drop the
ItemData for the Item.

Replace
  lstDest.AddItem Source.List(Source.ListIndex), InsertIndex

With
lstDest.AddItem Source.ItemData(Source.ListIndex), InsertIndex

Should do what you want.

--
Richard Mason



Sun, 28 Jan 2001 03:00:00 GMT  
 Does Anyone Know How To Drag And Drop?

Quote:





>> >Hello,

>> >Does anyonone understand the finer points of Drag-and-Drop events and
>methods?

>> >Here's is my problem:

>> >I have a list that I want the user to be able to drag to another window.
>> >But I don't want to drag the text of the list, I want to drag the
>> >ItemData.

>> >The ItemData contains id information that I need for the drop to work
>properly.

>> You don't need to put ID information in the ItemData array to get
>> DragDrop to work. Please clarify what you are trying to do.

>The list contains names. The ItemData contains primary keys to a database table.

>When the user drags the names, I want the ItemData to be dragged so that
>when the user drops, I can have access to the primary keys. Then I can run
>queries.

>Right now I am getting the Text not the ItemData.

>The drag and drop works just fine. I just want to somehow drag and drop
>the ItemData not the Text.

>Thanks for any help.

>Mike

See my VB FAQ page for an example Drag and Drop application:

        http://www.ovnet.com/~voltz/prog/vbfaq.htm

Hope this helps,


:)             aka Jack Voltz            :)  Web: www.ovnet.com/~voltz
:)      M  A  R  A  N  A  T  H  A  !     :)  
:)    S i e m p r e  P o r   V i d a !   :)  
----------------------------------------------------------------------
Prolife: http://www.ovnet.com/~voltz/prolife.htm
Music:   http://www.ovnet.com/~voltz/music.htm



Tue, 30 Jan 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Doing Drag&Drop from IE

2. AnyOne knows How It can Be Done?

3. AnyOne knows How It can Be Done?

4. Knowing which picture gets Dragged-and-Dropped

5. Anyone know how to drop primary key?

6. TreeView Drag n Drop don't allow dropping a parent into a child

7. Detect Drop in Drag and Drop

8. Does anyone know of a VB Drag/Drop example that actually works?

9. Anyone got drag/drop code to drag rows up or down in a grid?

10. Drag-drop - how do you know when user drops onto a bad place?

11. RTB Scroll During Drag doing it manual help :o)

12. How to knowing when a query is done

 

 
Powered by phpBB® Forum Software