#! ../wafe --f
# small example script to demonstrate scrolled lists
# with interaction with text widget
# do not try to edit binary files!
# Gustaf Neumann  Feb 16, 1993

mergeResources topLevel \
	*beNiceToColormap false \
	*Form.background gray75 \
	*Command.background gray90 \
	*List.background gray90 \
	*bottom chainBottom \
	*Command.top chainBottom

Form f topLevel
  Text a f \
	width 500 height 150 editType edit scrollVertical always
  Command Quit f \
	callback quit \
	fromVert a 
  Command clear f \
	label "Press Button to clear Text" \
	callback "sV a type string string {}" \
	fromVert a fromHoriz Quit
  action a override {<Btn3Down>: exec(sV a type string string {})}

  Viewport v f \
	height 175 allowVert true \
	fromHoriz a
    List l v \
	defaultColumns 1 \
	list [split [exec /bin/ls -1] \n] \
	callback "sV a type file string %s"

realize
