GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Sep 01, 2014 11:25 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Gnocl Text Widget has built-in spellchecking
PostPosted: Fri Apr 24, 2009 8:51 am 
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:

Image

One command switch turns it on or off! Nice one GtkSpell!

Will


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group