[comp.windows.x.motif] Pending Delete

pjp@sloth.mlb.semi.harris.com (Pat J. Pinchera) (02/06/91)

Has anyone had any success in getting the 'pending delete' capability
to work on initial values of text widgets? The capability I'm trying to
provide is similar to a MacIntosh implementation:

	When a text widget is displayed with an initial value,
	(in this case the Text is part of a prompt dialog) it should be 
	highlighted, i.e. selected, and if the user enters a new value, 
	the currently selected value should be replaced.

This capability does not work on the initial value. I've set the initial 
value with the XmTextSetString call, and selected it with XmTextSetSelection.
Everything looks OK until I enter a new value. Instead of replacing the 
currently selected text, it inserts at wherever the cursor is positioned.

Note that pending delete DOES WORK if the user selects the
text and enters a new value. This is why I'm confused as to why it DOES NOT
WORK on the initial (application selected) values.

If anyone has had a similar problem and has found a solution, please
post or e-mail. Thanks in advance.

Motif 1.0 (1.1 is expected in 2 weeks!)
DECstation 3100 (Ultrix)


Patrick Pinchera
Melbourne, FL