Differentiating user input and application update in xmText - Motif

This is a discussion on Differentiating user input and application update in xmText - Motif ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Differentiating user input and application update in xmText

  1. 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.

  2. 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 to Thread