xref: /freebsd/contrib/dialog/samples/radiolist2 (revision a96ef4501919d7ac08e94e98dc34b0bdd744802b)
14c8945a0SNathan Whitehorn#! /bin/sh
2*a96ef450SBaptiste Daroussin# $Id: radiolist2,v 1.9 2020/11/26 00:05:11 tom Exp $
34c8945a0SNathan Whitehorn
44c8945a0SNathan Whitehorn. ./setup-vars
54c8945a0SNathan Whitehorn
64c8945a0SNathan Whitehorn. ./setup-tempfile
74c8945a0SNathan Whitehorn
84c8945a0SNathan Whitehorn$DIALOG --ok-label Okay \
94c8945a0SNathan Whitehorn	--cancel-label 'Give Up' \
104c8945a0SNathan Whitehorn	--backtitle "No Such Organization" \
114c8945a0SNathan Whitehorn	--title "RADIOLIST BOX" --clear "$@" \
124c8945a0SNathan Whitehorn        --radiolist "Hi, this is a radiolist box. You can use this to \n\
134c8945a0SNathan Whitehornpresent a list of choices which can be turned on or \n\
144c8945a0SNathan Whitehornoff. If there are more items than can fit on the \n\
154c8945a0SNathan Whitehornscreen, the list will be scrolled. You can use the \n\
164c8945a0SNathan WhitehornUP/DOWN arrow keys, the first letter of the choice as a \n\
174c8945a0SNathan Whitehornhot key, or the number keys 1-9 to choose an option. \n\
184c8945a0SNathan WhitehornPress SPACE to toggle an option on/off. \n\n\
194c8945a0SNathan Whitehorn  Which of the following are fruits?" 20 61 5 \
204c8945a0SNathan Whitehorn        "Apple"  "It's an apple." off \
214c8945a0SNathan Whitehorn        "Dog"    "No, that's not my dog." ON \
224c8945a0SNathan Whitehorn        "Orange" "Yeah, that's juicy." off \
234c8945a0SNathan Whitehorn        "Chicken"    "Normally not a pet." off \
244c8945a0SNathan Whitehorn        "Cat"    "No, never put a dog and a cat together!" off \
254c8945a0SNathan Whitehorn        "Fish"   "Cats like fish." off \
264c8945a0SNathan Whitehorn        "Lemon"  "You know how it tastes." off 2> $tempfile
274c8945a0SNathan Whitehorn
28*a96ef450SBaptiste Daroussinreturncode=$?
294c8945a0SNathan Whitehorn
304c8945a0SNathan Whitehorn. ./report-tempfile
31