GtkSpell is a really useful spell checking resource support for which has just been added to the developmental version of Gnocl. Here's a copy of the Tcl test script:
[code=]# GtkSpell_TEST.tcl
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
package require Gnocl
# create a button to control the spellcheck process
set but1 [gnocl::toggleButton \
-text "%#SpellCheck" \
-variable sc \
-value 1 \
-onValue 1 \
-offValue 0 \
-onToggled { $txt1 configure -spellCheck $sc }]
# create a text widget, set spellcheck on
set txt1 [gnocl::text -spellCheck 1 ][/color]
# add a container and pack widgets
set box [gnocl::box -orientation vertical -align left]
$box add $but1 -fill {1 0} -expand 0
$box add $txt1 -fill {1 1} -expand 1
# creat toplevel and add the the gui content
set win [gnocl::window -title "GtkSpell Demo" -child $box -onDelete {exit} ]
# no more, so run....
gnocl::mainLoop[/code]
And here's the screen grab:
One command switch turns it on or off! Nice one GtkSpell!
Will