xref: /freebsd/contrib/dialog/samples/checklist8 (revision 79ac3c12a714bcd3f2354c52d948aed9575c46d6)
1#! /bin/sh
2# $Id: checklist8,v 1.11 2020/11/26 00:03:58 tom Exp $
3# "checklist7" without --item-help
4
5. ./setup-vars
6
7. ./setup-tempfile
8
9$DIALOG --help-button \
10	--colors \
11	--backtitle "\Z1No Such\Zn Organization" \
12	--separate-output \
13	--title "CHECKLIST BOX" "$@" \
14        --checklist "Hi, this is a checklist box. You can use this to \n\
15present a list of choices which can be turned on or \n\
16off. If there are more items than can fit on the \n\
17screen, the list will be scrolled. You can use the \n\
18\Z4UP/DOWN\Zn arrow keys, the first letter of the choice as a \n\
19hot key, or the number keys 1-9 to choose an option. \n\
20Press \Zb\ZrSPACE\Zn to toggle an option on/off. \n\n\
21  Which of the following are fruits?" 20 61 5 \
22        "Apple"      "It's an \Z1apple\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                    off \
23        "Dog"        "No, that's not my dog. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                  ON  \
24        "Orange"     "Yeah, that's juicy. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                     off \
25        "Chicken"    "Normally not a pet. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                     off \
26        ""           "No such pet. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                            off \
27        "Cat"        "No, never put a dog and a cat together! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" oN  \
28        "Fish"       "Cats like \Z4fish\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"                   On  \
29        "Lemon"      "You know how it \Zr\Zb\Z3tastes\Zn. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"     on  2> $tempfile
30
31returncode=$?
32
33. ./report-tempfile
34