#!/usr/bin/wksh -motif

#
# A simple demo of text widget functionality,
# including tests of all text widget convenience
# functions.
#

ai TOPLEVEL xmtext Xmtext "$@"

addcols $TOPLEVEL c
cmw t t text $c 
addrows $c r
sv $r packing:PACK_COLUMN numColumns:5
addbuttons $r \
	"Put ABCDEF..."	'textset $t "ABCDEFGHIJHLMNOPQRSTUVWXYZ"' \
	"Get"			'textget $t' \
	"Replace 10-15 'XXXX'"	'textreplace $t 10 15 XXXX' \
	"Replace 1-10 'YYYY'"	'textreplace $t 1 10 YYYY' \
	"Clear Selection"	'textclearsel $t' \
	"Select 10-15"		'textsetsel $t 10 15' \
	"Get Selection"		'textgetsel $t'

rw $TOPLEVEL
ml
