Here is an example someone from Alias posted...
window;
paneLayout -configuration "quad";
button
-dragCallback myDragProc
-dropCallback myDropProc;
iconTextButton -image1 "sphere.xpm"
-dragCallback myDragProc
-dropCallback myDropProc;
textScrollList
-append "A" -append "B" -append "C"
-dragCallback myDragProc
-dropCallback myDropProc;
textScrollList
-append "A" -append "B" -append "C"
-dragCallback myDragProc
-dropCallback myDropProc;
showWindow;
global proc string [] myDragProc(
string $dragControl,
int $x,
int $y,
int $mods)
{
print ("Drag from " + $dragControl + ".n");
string $result[] = {"MyDragMessage"};
return $result;
}
global proc myDropProc(
string $dragControl,
string $dropControl,
string $msgs[],
int $x,
int $y,
int $type)
{
print ("Drop on " + $dropControl + ".n");
};
--g