dragDrop with data grid objects

Peter Haworth pete at lcsql.com
Tue Apr 21 18:20:20 EDT 2015


I believe this works, don't remember where I got it.  Needs to be in the
datagrid group script.

on dragStart
   local tIndex
   if (the dgHeader of the target is empty) then
      put the dgIndex of the dgDataControl of the target into tIndex
      set the dgDragImageIndex of me to tIndex
      set the dragData["private"] to empty
      set the dgTrackDragReorder[tIndex] of me to true
   end if
end dragStart

on DragReorderDrop pOriginatingIndex, pStartLine, pDroppedOnLine
   if (pStartLine is not pDroppedOnLine) then
      SetLineOfIndex pOriginatingIndex, pDroppedOnLine
      send "RefreshList"to me in 0 secs
   end if
end DragReorderDrop

on dragMove
   set the dragaction to "move"
end dragMove

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Tue, Apr 21, 2015 at 3:10 PM, Bob Sneidar <bobsneidar at iotecdigital.com>
wrote:

> No takers eh?
>
> Bob S
>
>
> > On Apr 20, 2015, at 16:24 , Bob Sneidar <bobsneidar at iotecdigital.com>
> wrote:
> >
> > Any idea if I can use dragDrop with a data grid object? Currently I get
> the gray cross circle when trying to drag a file to a data grid. I wanted
> to create an import handler activated by simply drag dropping the file onto
> the data grid. I can do it with a field, but not with a data grid.
> >
> > Bob S
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list