You are not logged in.
Pages: 1
Because of it's rather search-unfriendly generic name, information for the dialog program, i.e. this: http://linuxcommand.org/images/adventur … ialog1.png , is just a bit difficult to come by, so hopefully someone here has experience with dialog and knows the answers to my question that Google seems to guard closely.
Is there a way, when making a menu, to not require the Enter key to be pressed, but rather just the letter/number assigned to the entry? I've been doing this in bash using:
read -n 1 $opt
but I can't seem to find a setting for dialog.
In the same vein, (a menu) (or would this be a capillary?) is there a setting to make the menu automatically resize to the entries passed, rather than having to manually define the box sizes?
Last edited by RankoKohime (2019-03-24 15:18:30)
Offline
I don't believe there is a way to get a single key press in a menu. But why use dialog for this at all of this is what you want?
As for the sizing:
Most widgets accept height and width parameters, which can be used to automatically size the widget to accommodate multi-line message prompt values:
...
· If the parameter is zero, dialog uses minimum size for the widget to display the prompt and data.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Your first Q. I second Trilby on that one, at least never seen it.
The second, try and give all measures a '0' like so:
$dialog --title "sizing the dialog" --menu "--Your menu-- " 0 0 0 \
Offline
I don't believe there is a way to get a single key press in a menu. But why use dialog for this at all of this is what you want?
As for the sizing:
man dialog wrote:Most widgets accept height and width parameters, which can be used to automatically size the widget to accommodate multi-line message prompt values:
...
· If the parameter is zero, dialog uses minimum size for the widget to display the prompt and data.
I'm testing out dialog as a replacement to the hand-coded menu I'm currently using, to reduce time spent tweaking.
As for the sizing, thanks, I must have overlooked that part of the manpage.
Last edited by RankoKohime (2019-03-28 03:37:00)
Offline
RankoKohime, In case you were wondering, You left a report for the moderators rather than replying. It looks like you did a good job of reposting the data pretty much verbatim.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
RankoKohime, In case you were wondering, You left a report for the moderators rather than replying. It looks like you did a good job of reposting the data pretty much verbatim.
I did indeed. I realized that after submitting it. Either I need new glasses, or a custom CSS for this forum. Or probably both.
Offline
Pages: 1