Drag and drop - How to do - like itunes-software
Posted: Thu Sep 20, 2007 5:46 pm
Is it possible to realize a "Drag&Drop" to a listbox
by marking the list with the item which is dropped in?
Regards
Otto
Is it possible to realize a “Drag&Drop” from a browser to a listbox by marking the list the item is dropped in? I have included a graphical example from my itunes-software where songs can be selected and put from a common pool into a specific playlist. The selected playlist remains marked until the action is finished.
img]http://www.atzwanger.com/fw/Clip2.jpg[/img]
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oCursor, oBtn, oLbx, cItem
DEFINE CURSOR oCursor RESOURCE "book"
DEFINE WINDOW oWnd TITLE "FiveWin own Drag-Drop features!!!"
@ 3, 3 BUTTON oBtn PROMPT "DragMe/DropMe at the Listbox" SIZE 210, 25
oBtn:oDragCursor = oCursor
oBtn:bDragBegin = { | nRow, nCol, nKeyFlags | SetDropInfo( Time() ) }
@ 6, 3 LISTBOX oLbx VAR cItem ;
ITEMS { "I am a listbox!","Apples", "Oranges", "Lemons", "Limes" } SIZE 200, 200
// Set a DropOver action for the ListBox
oLbx:bDropOver = { | uDropInfo, nRow, nCol, nKeyFlags | ;
msginfo(uDropInfo),msginfo(str(nRow)+" " + str(nCol) + " " + str(nKeyFlags)) }
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
//-------------------------------------