Tk::TextUndo(3pm)

Tk::TextUndo3pm

Perl/tk text widget with bindings to undo changes.

Usage

use Tk::TextUndo;

$testundo = $parent->TextUndo(?-option=>value, ...?);

Overview

This IS-A text widget with an unlimited 'undo' history but without a re'undo' capability.

Bindings

The "TextUndo" widget has the same bindings as the Text widget. In addition there are the following bindings:

Event <L4> <<Undo>>

undo the last change. Pressing <L4> several times undo step by step the changes made to the text widget.

Methods

The "TextUndo" widget has the same methods as "Text" widget. Additional methods for the "TextUndo" widget are:

$text->Load($filename);

Loads the contents of the $filename into the text widget. Load() delete the previous contents of the text widget as well as its undo history of the previous file.

$text->Save(?$otherfilename?)

Save contents of the text widget to a file. If the $otherfilename is not specified, the text widget contents writes the file of $filename used in the last Load() call. If no file was previously Load()'ed an error message pops up. The default filename of the last Load() call is not overwriten by $otherfilename.

$text->FileName(?$otherfilename?)

If passed an argument sets the file name associated with the loaded document. Returns the current file name associated with the document.

Keys

widget, text, undo

Releases

16 releases since Debian 2.0 (Hamm); the text changed 15 times.

  1. 2.0
  2. 2.1
  3. 2.2
  4. 3.0
  5. 3.1
  6. 4.0
  7. 5.0
  8. 6.0
  9. 7
  10. 8
  11. 9
  12. 10
  13. 11
  14. 12
  15. 13
  16. Arch

From perl-tk 804.036-9 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.