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
or:
my $t1 = $mw->Viewer()->pack();
.....
$t1->Load($filename));
Also:
viewer.pl [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 viewer.pl 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:
$text_view->LabelConfig(``Search:'')$text_view->LabelConfig(``-cursor=> 'dot''')$text_view->LabelConfig({text=>'Find:',-cursor=>'dot',...})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.
If $ENV{LANG} is a 'UTF-8' locale, file load will assume ``utf8'' characters in file.
viewer.pl - 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 <raz@raz.co.il> in 2003.
Copyright (c) 2003-2004 RAZ Information Systems All rights reserved. http://www.raz.co.il/
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file