Version 0 of Spellchecking the Contents of the gnocl::text Widget.

Updated 2009-04-12 22:11:26 by wjg

WJG (12-Apr-2009) The GtkSpell extension is a really useful tool that will check the input of any GtkTextView widget and mark up dubious words. Then, click MB-3 and the popup menu will appear with a range of suggestings. Here's the script to show how its done:

# GtkSpell_TEST.tcl
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"

package require Gnocl

set but1 [gnocl::toggleButton \
    -text "%#SpellCheck" \
    -variable sc \
    -value 1 \
    -onValue 1 \
    -offValue 0 \
    -onToggled { $txt1 configure -spellCheck $sc  }]


set txt1 [gnocl::text -spellCheck 1 ]
set box [gnocl::box -orientation vertical -align left]
$box add $but1 -fill {1 0} -expand 0

$box add $txt1 -fill {1 1} -expand 1

set win [gnocl::window -title "GtkSpell Demo" -child $box ]

gnocl::mainLoop

And here's the screen shot.

http://wjgiddings.googlepages.com/Screenshot-GtkSpellDemo.png


enter categories here