Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Differentiating user input and application update in xmText

1 view
Skip to first unread message

K.I.

unread,
May 29, 2008, 12:34:48 AM5/29/08
to
I have one text box that allows user input, and at the same time,
application will be updating the value in the text box every 30
seconds. I need to enable a button if it is a user input.
I tried several callbacks on to differentiate between user input from
keyboard and application update, but to no avail.
verify and valueChange callbacks does not tell me who changed the
value, is there a solution to this? Thanks.

Fred

unread,
May 29, 2008, 11:03:42 AM5/29/08
to

How is the application updating the text field? Does it use
XmTextSetString(), or XtSetValues()?

You could check the event field of the callback struct. If the event
field
is not NULL, and the event is a KeyPress, then it is the user typing
info into the text field. If the event is a button release, it is the
user
dropping a transfer or primary selection.

If the app uses XmTextSetString, the event will be NULL.
--
Fred Kleinschmidt

0 new messages