TclMacBag - Bag of Mac Widgets for Tcl/Tk
The entry widget

HomeF.A.QChangelogLicenseAbout

In Brief

This is a wrapper around the Tile/Ttk entry widget which provides an automatic right-click popup menu with standard actions (Cut, Copy, Paste, Clear), in much the same way as ::tclmacbag::text.

This command will be available from TclMacBag 0.14.

Commands

See: the Tile entry manual.

Popups

By default, this widget contains bindings to a popup menu with the following menu options (disabled where the option is inappropriate or the data is unavailable): Cut, Copy, Paste, Delete, (Separator), Select All, Clear.

For display-only widgets, the standard Tk ::text widget (with a focus highlight of 0 pixels) is more appropriate. However, unbinding the menus is as simple as redefining the bindings to Control-ButtonPress-1, ButtonRelease-2 and ButtonRelease-3.

The popups menu first appeared in version 0.14.

Further Information

TclMacBag sets up a virtual event called <<RightClick>> which is <ButtonRelease-3> on all systems except Mac, where it is <Control-ButtonPress-1>. To disable the right-click binding, or replace it with your own, use:

bind $w <<RightClick>> { }

© Peter Caffin, 2010-2017.