42) How can I select all of the text in a widget programmatically?

So that some initial text is displayed, but anything typed replaces it.
Answer: XmTextSetSelection(Text1, 0, XmTextGetLastPosition(Text1), event-
>xbutton.time);
where Text1 is the widget in question (obviously) and event is some event that
triggered this call. You can use XtLastTimestampProcessed( display) instead
of xbutton.time if you don't happen to have an event pointer handy.