Drag/drop shelf button command to textField?

-how do you script a textField to print the command when you drop a shelf button on it? Just like a shelf button being dropped on the script editor.
I can't find any clear examples of the drag and drop setup...

thanks

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

-does this mean I need to know the dragCallback for a shelfButton in order to drop it on a textField I create? it's funny you can edit a callback through MEL, but you can't query it...ugg...

-when I drop a shelf button on any of these I get nothing.

It might be that you can't drop a shelf button onto a textField. The few tests I've done with the drag and drop flags I noticed that not all of them work with eachother.

I think you will need to know the dragCallback inorder to drop it. Are you using the shelfs in Maya or in your own UI?

--g

...scrollField does exactly what I need...