[comp.windows.x] Novice vs. Xaw Dialog Widget

djb@cbnews.ATT.COM (David J. Bryant) (12/15/88)

A question from a widget neophyte...

I'm trying to use an Athena Dialog widget to get occasional, brief input
from the user.  I've implemented a dialog widget that has an appropriately
provocative label, a spacious value area, and two command buttons -- one
to confirm the input and process it further, and another to cancel the
input action.  Everything works just ducky, except I can't figure out
how to clear the value area in the widget after the user has hit either
"cancel" or "confirm".  I'd really like the string value to disappear and
be replaced by a null string so the next time I want input the string
value is empty.

Apparently the value portion of the dialog widget uses a static buffer
and keeps count of how many characters are there.  (I can overwrite the
beginning of the buffer with a NULL, but instead of clobbering the whole
string it causes the first character to be displayed as ^@.)  Other attempts
to manipulate the string at the location returned by *XtDialogGetStringValue()
have resulted in similar unsatisfying behaviour.

I've been through the Athena Widget manual repeatedly and haven't turned
up anything.  Before I dive into the Dialog widget code or punt the whole
thing and create my own, I thought I'd see if anyone could tell me what I
might be overlooking...

	Thanks,
	David Bryant  (djb@cbosgd.att.com)
	AT&T Bell Laboratories
	Columbus, OH  (614/860-4516)