Differentiating user input and application update in xmText
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.
Re: Differentiating user input and application update in xmText
On May 28, 9:34*pm, "K.I." <kwatt...@gmail.com> wrote:[color=blue]
> 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.[/color]
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