APL2000 Tree Control Drag & Drop 
Author Message
 APL2000 Tree Control Drag & Drop

How does the Tree control in APL+Win know where you've dropped something?

--
Later...
-----------------------------------------------------------------------
|\/| Randy A MacDonald             | you can't pay for it,

     BSc(Math) UNBF'83 Sapere Aude | APL: If you can say it, it's done..
     Natural Born APL'er           |
------------------------------------------------------------{ gnat }-



Wed, 29 Mar 2006 23:32:15 GMT  
 APL2000 Tree Control Drag & Drop
See the documentation on the onDrop event.

onDrop

The Drop event occurs for a (potential) target of a drag-and-drop operation
when the source drops the item, typically by virtue of the user releasing
the mouse button.  Owarg is a nine-element vector.  The first eight elements
are the same as the values for Owarg for the onDragEnter event handler and
the first seven elements are the same as the values for Owarg for the
onDragOver event handler.

l The first element is class-specific information describing the current
location of the mouse in the target window; for Tree and Listview, this is a
two element nested vector containing the node id under the cursor and where
on the node the cursor is (see the description of the HitTest method).
l The second element is the vertical position of the mouse in the control in
current scaling units.
l The third element is the horizontal position of the mouse in the control
in current scaling units.

l The fourth element is the state of the mouse buttons; the sum of 1, 2, and
4 for left mouse button, right mouse button, and center mouse button
pressed.
l The fifth element is the shift key state; the sum of 1, 2, and 4 for
Shift, Ctrl, and Alt keys pressed.
l The sixth element is the elapsed scroll time in seconds.
l The seventh element is a character vector describing the direction of
scroll.
l The eighth element is a character vector telling the first format in
targetformats that the source is willing to provide.

l The ninth element is a nested vector containing the data being dropped;
the eighth element determines the format of these data.

Owres contains a drop effect; the value is based on the state of the Control
key.  APL drop targets return 'copy' if the Control key is down and 'move'
if it is not.   Note that these values reflect de facto Windows programming
conventions.  They do not determine the actual nature of the drop.  The
application is responsible for performing an appropriate action, typically
in this event handler, such as inserting a new node or moving a node in a
Tree object.


Quote:
> How does the Tree control in APL+Win know where you've dropped something?

> --
> Later...
> -----------------------------------------------------------------------
> |\/| Randy A MacDonald             | you can't pay for it,

>      BSc(Math) UNBF'83 Sapere Aude | APL: If you can say it, it's done..
>      Natural Born APL'er           |
> ------------------------------------------------------------{ gnat }-



Thu, 30 Mar 2006 02:58:39 GMT  
 APL2000 Tree Control Drag & Drop
Thanks so much. For some reason (my partial blindness perhaps?) I totally
missed this.



Quote:
> See the documentation on the onDrop event.

> onDrop

//

Quote:


>> How does the Tree control in APL+Win know where you've dropped
>> something?

--
Later...
-----------------------------------------------------------------------
|\/| Randy A MacDonald             | you can't pay for it,

     BSc(Math) UNBF'83 Sapere Aude | APL: If you can say it, it's done..
     Natural Born APL'er           |
------------------------------------------------------------{ gnat }-


Thu, 30 Mar 2006 03:30:36 GMT  
 APL2000 Tree Control Drag & Drop
The docs have a section on "Drag-and-drop source events", that I recall
looking at and wondering the same thing as your question.  It at first
seemed to me that the onDragEnd event should be the answer, which it is not.
The section on "Drag-and-drop target events" of course is the answer, and
onDrop has all the juicy details...  Alas, the documentation is all correct
and consistent, just not my first pass impressions.


Quote:
> Thanks so much. For some reason (my partial blindness perhaps?) I totally
> missed this.



> > See the documentation on the onDrop event.

> > onDrop
> //



Thu, 30 Mar 2006 03:35:58 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Active X controls (Drag & Drop)

2. Drag-and-drop between BWidget tree and BWidget listbox--need help

3. ANNOUNCE: Tree widget for Tcl with drag and drop

4. Drag and drop to control in window?

5. Help with drag and drop controls

6. Drag & Drop from outside the app

7. Drag & Drop from MS-Windows

8. Drag&Drop

9. Drag & Drop Question

10. drag and drop & aliases

11. Drag & Drop: Usability Information

12. Drag&Drop Process Event

 

 
Powered by phpBB® Forum Software