Drag
and Drop from a TreeView to a ListBox
In this this example, we'll drag and drop
from a TreeView to a ListBox. The example here has a TreeView with
a main node called "Cars" which has subnodes that contains certain makes,
and these in turn, have subnodes which contain specific models. The
ListBox is programmed to accept all the models if the "Cars' node is dragged
and dropped, or all the models of a certain make if a certain "make" node
is dragged and dropped. The ListBox also accepts individually dragged
models. Both the ListBox and TreeView have DragMode properties set
to dmAutomatic.
KEYWORDS: drag and drop, BeginDrag,
ClassNameIs, Node->GetNext
|