You are not logged in.
Hi,
I am using Xdialog version
$ pacman -Qs xdialog
local/xdialog 2.3.1-6
A drop-in replacement for the 'dialog' or 'cdialog' programsThe example below should move the default (initial) button to "No". It does not.
#!/bin/bash
Xdialog --title " My first dialog" --default-no \
--yesno "Hello , this is my first dialog program" 10 30
case $? in
0)
echo "Yes chosen.";;
1)
echo "No chosen.";;
255)
echo "ESC pressed.";;
esacThe behavior is the same when using
--defaultno On the other hand,
--defaultno works fine with "dialog" instead of "Xdialog"
$ man xdialog
--default-no
This option may be used with all widgets with a "Cancel" or "No"
button. Note that it is ignored when the --wizard option is in
force.Am I missing something? --default-no is a transient option, and comes after the common options, according to the man page. This is how I have it in the above code.
On a separate note, any ideas about how to put no on the left and cancel on the right?
EDIT:
Another strange behavior, pressing escape doesn't show the 255) message, but shows the no message - another difference to dialog
Last edited by ssgross (2012-12-23 22:34:35)
Offline