On the code I sent, please replace the line:

   XtAddCallback(PopUpShell, XtNcallback, MyPopUp, (XtPointer)PopUpShell);

by

   XtAddCallback(Button, XtNcallback, MyPopUp, (XtPointer)PopUpShell);

--- 

The rest (and my question) remains the same...