The Perl/Tk Text Widget Extended Methods

These methods are available only with the Perl/Tk Text widget and are documented nowhere else but in this tutorial. Another unique feature is the built-in Menu, activated by a <Button-3> click, which calls many of these methods for common text-related activities. The built-in Menu is shown in Figure 8-7. Figure 8-7

Figure 8-7. Built-in Menu

To disable the default Menu, use $text->menu(undef). To supply your own Menu, first create it and then use $text->menu(my_menu).

Here, then, is the complete list of extended Text widget methods. These methods should be considered experimental, so use them with caution and expect that you may have to change your code in the future.

For a demonstration of these extended Text widget features, run the widget demonstration "Gedi master advanced text editor"[18] from the "User Contributed Demonstrations" section of the program.

[18] Yes, that's "Gedi," not "Jedi" (with apologies to George Lucas).