2 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=koi8-r">
3 <TITLE>Textprops package</TITLE>
4 <META NAME="description" CONTENT="Right-click menus for text and entry
8 <H1>Textprops package</H1>
9 <H3>Right-click menus for entry and text
12 Tk by default doesn't provide right-click bindings for <b>entry</b> and
13 <b>text</b> widgets. But user typically expect that right click on the
14 edit area would bring up a menu with common edit operations.
17 <A HREF="textprops.tcl">textprops</a> package fixes this problem.
18 Loading this file create bindings for Text and Entry bindtags which
19 bring up <b>tk_popup</b> with common edit operations.
21 Even more, bindings check state of widget and system clipboard and
22 disable some entries appropriately.
24 It also has function <b>textprops::StdEditMenu</b> which allows to fill
25 previously created menu with standard edit commands and adds a
26 <b>-postcommand</b> which control their state.
29 ::textprops::StdEditMenu menu text-widget
31 where <i>text widget</i> is the name of text widget which should be
32 controlled by the menu. Variable and command substitution can be used in
33 the text-widget name. So it is possible to use single edit menu for
34 multiple text windows if you figure out how to pick current one.
36 Package uses msgcat package to localize menu entries. Currently no .msg
37 files provided and no mcload is called. Russian localization is built
38 directly into package code (.i.e mcmset command).
42 <li>Undo/Redo are missing for entry widget, because tk lacks undo stack
44 <li>Redo is always enabled for text widgets with enabled undo mechanism,
45 because I couldn't find way to check whether redo is possible
46 <li>No support for switching encodings on the fly. Inserted files are
47 always assumed to be in system encoding
48 <li>No support for per-widget setting of filetypes allowed to be