Parent document is top of "Motif FAQ (Part 4 of 9)"
Previous document is "100) Does the text widget support 16 bit character fonts?"
Next document is "102) How can I replace characters typed with say a `*'? I want to"

101) How can I stop the text widget from echoing characters typed?

I need to turn off echo for password input.

Answer:  Use the XmNmodifyVerifyCallback to tell when input is received. Set
the `doit' field in the XmTextVerifyCallbackStruct to False to stop the echo.
(In Motif 1.0 this will cause a beep per character: Live with it, because at
1.1 you can turn it off.)  Note that password hiding is inherently insecure in
X - someone may have an X grab on the keyboard and be reading all characters
typed in anyway.

Another solution often proposed is to set the foreground and background
colours to be the same, effectively hiding the text.  This has a major flaw:
someone may select the text (triple click the mouse to get the line), and then
paste the password into say an xterm with *different* foreground and
background colours.  This immediately shows the password.

Parent document is top of "Motif FAQ (Part 4 of 9)"
Previous document is "100) Does the text widget support 16 bit character fonts?"
Next document is "102) How can I replace characters typed with say a `*'? I want to"