Attention: The Usenet Article Lookup site has been updated.
The code for this site has been ported from Perl to PHP, so you could say, it is in beta mode. Please contact me if find any problems, or have any suggestions. -- Howard
Deutsch   English   Fran├žais   Italiano  

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!!!!!!!!!!!!!not-for-mail
Message-ID: <46991608$0$1594$>
From: Keith Nash <>
Subject: Ann: ntext
Newsgroups: comp.lang.tcl
Date: Sat, 14 Jul 2007 19:32:14 +0100
User-Agent: KNode/0.10.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Lines: 39
Organization: Customer of PlusNet plc (
X-Trace: DXC=`PMWjbMAmW3mfO`>Qf\K]1igd3Y`7Rb;>37XnI;[OUC4lFKN5RRG[k5XneeXC7GYS8>[VPcg4cHE2T2]\<TV63;;
Bytes: 2980

The purpose of the ntext package is to make the Tk 8.5 text widget behave
more like other text-editing applications. It makes the text widget more
useful for implementing a text editor, and makes it behave in a way that
will be more familiar to most users.

The package provides a binding tag named Ntext for use by text widgets in
place of the default Text binding tag.  Package ntext's functions and
variables are contained entirely in the ::ntext namespace. ntext has no
exports to the global or other namespaces.

The differences between the Ntext binding tag and the default Text binding
tag are in three categories:

- Some Text bindings behave differently from most text-editing applications.
Ntext gives these bindings more familiar behaviour.
- When a logical line with leading whitespace is word-wrapped onto more than
one display line, the wrapped display lines begin further to the left than
the first display line, which can make the text layout untidy and difficult
to read. ntext can indent the wrapped lines to match the leading whitespace
of the first display line (this facility is switched off by default).
- When the user navigates or selects text, Tcl/Tk sometimes needs to detect
word boundaries. ntext provides improved rules for word boundary detection.

The new bindings include: "Smart Home", "Smart End", "Insert" key (toggles
insert/overwrite), "Escape" key (clears the selection).

In addition, some oddities of the Text bindings are removed (e.g. the Text
bindings do not play nicely with the empty region after the end of a line:
a mouse click here places the cursor on the line below; a double-click or
drag highlights and selects this region although it has no characters).

ntext has been incorporated into tklib, and can be obtained by fetching the
tklib module from tcllib's CVS repository.  It is for Tk 8.5 only.  Full
documentation, examples and demos are included.

Further information: