I am try to create tui via ncurses. And I have same problem. There are two fields:
Name
_______
Password
_______
How to implement backspace-support in each field ?
And how to use '*' to show each character in password-field ? (Now I use field_opts_off(field[1], O_PUBLIC);
and it doesn't show characters in password-field, only move cursor).
Thank you.
There is no tutorial for the forms package that I recall. However, the ncurses test-programs (which are available separately as ncurses-examples) contains a program
demo_forms
which does implement deletion by maintaining the edited field contents as a hidden field buffer, and decrementing its length in the case forREQ_DEL_CHAR
.Here is a screenshot of the program:
Regarding the "non-ncurses" suggestion: dialog is a curses/ncurses application, and has no particular dependency upon
bash
.