Hi all. Since being enlightened by Dar (I think it was) about setting the dragAction to "copy", I have entered into a new world of possibilities! One of them is drag and drop for datagrids. I'm sure that for those well versed in both datagrids and dragDrop, this will seem elementary, but for those who are not:
on dragEnter -- this code will select datagrid records as you drag over them! set the dragAction to "Copy" put the mouseControl into tControlID if tControlID is empty then exit dragEnter put the dgDataControl of tControlID into tDataControl -- trap for no control try put the dgIndex of tDataControl into tIndex catch tError exit dragEnter end try set the dgHilitedIndex of me to tIndex end dragEnter on dragDrop put the mouseControl into tControlID if tControlID is empty then exit dragDrop put the dgDataControl of tControlID into tDataControl -- trap for no control try put the dgIndex of tDataControl into tIndex catch tError exit dragDrop end try -- put your custom stuff here -- end dragDrop _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode