Differentiating user input and application update in xmText

This is a discussion on Differentiating user input and application update in xmText within the Motif forums, part of the Tools category; 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 ...

Go Back   Unix Linux Forum > Technologies & Tools > Tools > Motif

FixUnix.com - Unix Linux Forums

Unix Content Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 05-29-2008, 12:34 AM
Default 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.
Reply With Quote
  #2  
Old 05-29-2008, 11:03 AM
Default Re: Differentiating user input and application update in xmText

On May 28, 9:34*pm, "K.I." wrote:
> 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.


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
Reply With Quote
Reply

Thread Tools


All times are GMT -5. The time now is 05:15 PM.

In an effort to better serve ads to our visitors, cookies are used on Fixunix.com. For more information, check out our Privacy Policy.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Ad Management by RedTyger