ntextBindings(n) Alternative Bindings for the Text Widget ntextBindings(n)


ntextBindings - Alternative Bindings for the Text Widget

package require Tcl 8.5

package require Tk 8.5

package require ntext ?0.81?


The ntext package provides a binding tag named Ntext for use by text widgets in place of the default Text binding tag.

The Text binding tag provides around one hundred bindings to the text widget (the exact number is platform-dependent). A few of these behave in a way that is different from most contemporary text-editing applications. Ntext aims to provide more familiar behaviour.

Features of the Ntext bindings that differ from the default Text bindings:

The last three cases, the behavior of Text is often useful, so Ntext gives you the option of retaining it, by setting variables defined in the ::ntext namespace to 1 (instead of their default 0). Explaining these features in more detail:

Ntext provides alternatives to a number of behaviours of the classic Text binding tag. Where there is an option, the Ntext behaviour is switched on by default, except for display-line indentation which is discussed on a separate page at ntextIndent.

The behaviour of Ntext may be configured application-wide by setting the values of a number of namespace variables:

::ntext::classicAnchor

::ntext::classicExtras

::ntext::classicMouseSelect

::ntext::overwrite

To use Ntext but keep classic Text 's variable-anchor feature:

package require ntext
text .t
set ::ntext::classicAnchor 1
bindtags .t {.t Ntext . all}

bindtags, ntext, ntextIndent, text

bindtags, text

0.81 ntext