Tk::Text::Viewer - Simple Text Viewer


    use Tk;
    use Tk::Text::Viewer;
    my $mw = MainWindow->new;
    my $t1 = $mw->Scrolled('Viewer', -wrap => 'none'......);
    $t1->LabelText("Search:");# Change label text
    my $t1 = $mw->Viewer()->pack();
Also: [TextFile]


Tk::Text::Viewer IS A text widget that can display text files under TK. It enable the user to search text and navigate in a Text widget. The reason for creating this module is that it doesn't require downloading of modules other that Tk; Look for widget options in the Tk::Text manpage.

A separate program is included that can be used as a stand alone file browser.


The Viewer widget also inherits all the methods provided by the generic Tk::Widget and Tk::Text classes.

The following additional method is available for viewer widgets:

Load file into the text widget.

$text_view->LabelConfig(string or hash ref)
$text_view->EntryConfig(string or hash ref)
Change the entry widget options. Read LabelConfig for information about parameters. See the Tk::Entry manpage for valid options.


For inherited bindings look the Tk::Text manpage. Following are class specific bindings.

Clicking Space will move text one page ahead.

Clicking BackSpace will move text one page up.

Clicking ``/'' will open text search window.

Clicking ``n'' will move to next search match.

Clicking ``N'' will move to next previous match.

Find all occurrences of searched item.

SEE ALSO - A utility using Tk::Text::Viewer included with this package.

Tk::Text, Tk::Widget, Tk::More, Tk documentation.


Tk::Text::Viewer was written by Oded S. Resnik <> in 2003.

Copyright (c) 2003 RAZ Information Systems All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file