Widget text_w;
Arg args[5];
int n = 0;
...
XtSetArg (args[n], XmNdropSiteActivity, XmDROP_SITE_INACTIVE); n++;
XmDropSiteUpdate (text_w, args, n);
...
Even though drop sites are associated with widgets, you have to set DropSite resources using
XmDropSiteUpdate(), not XtVaSetValues().
One situation in which you would probably want to disable a built−in drop site is when the widget is designed to be
output−only. If you set the XmN-editable resource of a Text or TextField widget to False, the user cannot drop
data in the widget because it is uneditable. However, the toolkit still displays the default drag−under visual effects in
this case, so the widget appears as though it functions as a drop site. To make it clear that the widget is not a drop site,
you can disable the drop site using one of the techniques we just described. If the widget is always uneditable, it is
fine to use XmDropSiteUnregister(), but if the widget changes state, you are better off setting
XmN-dropSiteActivity.
When you set a Text or TextField widget insensitive, the user cannot interact with the widget, so it doesn't make sense
for the widget to function as a drop site. However, there is currently a bug in the implementation of drag and drop
such that the user can drop text in an insensitive widget. To prevent this problem, whenever you change the sensitivity
of a Text widget, you should set the XmN-dropSiteActivity resource to match the sensitivity.
19.3.3 Modifying the Visual Effects
Motif provides resources that both ...