Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks
Searching for an easy to use TK rendering for Html I've found Tk::HyperText. I don't really understand what I'm doing wrong, but the following simple example is not working
#!/usr/bin/perl -w use strict; use warnings; use Tk; use Tk::HyperText; my $mw = MainWindow->new ( -title => 'HTML Viewer', ); my $hypertext = $mw->Scrolled ("HyperText", -scrollbars => 'e', -wrap => 'word', )->pack (-fill => 'both', -expand => 1); my $btnInsert = $mw->Button ( -text => 'insert', -command => \&insert, )->pack (-side => 'right'); MainLoop; insert(); sub insert{ # insert some HTML code $hypertext->insert ("end","<body bgcolor=\"black\" text=\"yellow\">" . "Hello, <b>world!</b></body>"); }
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Html rendering with Tk::HyperText
by zentara (Cardinal) on Jun 15, 2014 at 22:06 UTC | |
|
Re: Html rendering with Tk::HyperText
by wjw (Priest) on Jun 15, 2014 at 21:50 UTC |