Here's a very minimal implementation in Yad.
A textfile named 'mylist' in the same directory as the script contains "1 2 3 4 5 6 7 8 9 10". A space character is the default delimeter for input into lists.
The example script is:
#/bin/bash
thelist=$(<mylist)
thechoice=$(yad --title="Choose a value" --width=200 --height=200 --list --column="Values" --separator="" $thelist)
exit $(yad --title="You chose..." --text=$thechoice)
That's it. Scrolling the list is handled automatically. The --separator=""
is to supress Yad's default of appending a pipe character ("|") to the output.
When you read the man page, you will see that you have a large array of possibilites. You can add buttons, icons, radio buttons, etc. You can create tabbed dialogs by using Yad's Notebook feature to embed dialogs within other dialogs as plugins.
There's a long example at PCLinusOS mag and some interesting shorter examples at the Yad site.