Tk::HTML does indeed come with some "hidden" documentation.
However, I noticed it renders HTML horribly.

Here you can find the example code from the module and see it with your own eyes...
use Tk; require Tk::Web; # require Tk::ErrorDialog; require Tk::LabEntry; require URI::URL; require Tk::Menubar; my $pwd = `pwd`; chomp($pwd); my $urltxt; my $showlink; my $mw = MainWindow->new(); my $mb = $mw->menu; my $fm = $mb->Menubutton(-text => 'File', -underline => 0); my $em = $mb->Menubutton(-text => 'Edit', -underline => 0); my $vm = $mb->Menubutton(-text => 'View', -underline => 0); my $hm = $mb->Menubutton(-text => 'Help', -underline => 0); my $but = $mw->Frame->pack(-fill => 'x'); my $w = Tk::Web->new($mw,-showlink => sub { $showlink = shift }, -ur +lcommand => sub { $urltxt = shift} ); my $e = $mw->LabEntry(-label => 'Location:',-labelPack => [-side => +'left',-anchor => 'e'],-textvariable => \$urltxt )->pack(-fill => 'x' +); $e->bind('<Return>',[$w,'url',Tk::Ev(['get'])]); $w->{'-header'} = {'Accept' => join(',','text/html', 'text/plain', 'im +age/gif', 'image/x-xbitmap', 'image/x-pixmap +', '*/*'), 'User-Agent' => 'tkweb/.xx'}; $w->pack(-expand => 1, -fill => 'both'); $fm->command(-label => 'Open...',-underline => 0, -command => [$w,'Ope +n']); $fm->command(-label => 'Save as...',-underline => 0, -command => [$w,' +SaveAs']); $fm->command(-label => 'Exit',-underline => 1, -command => [$mw,'destr +oy']); $vm->command(-label => 'Reload',-underline => 0, -command => [$w,'Relo +ad']); $vm->command(-label => 'Source...',-underline => 0, -command => [$w,'S +howSource']); $vm->command(-label => 'HTML...',-underline => 0, -command => [$w,'Sho +wHTML']); $but->Button(-text => 'Back', -command => [$w,'Back'])->pack(-side => +'left'); $but->Button(-text => 'Forward', -command => [$w,'Forward'])->pack(-si +de => 'left'); $but->Button(-text => 'Home', -command => [$w,'Home'])->pack(-side => +'left'); $but->Button(-text => 'Reload', -command => [$w,'Reload'])->pack(-side + => 'left'); $but->Button(-text => 'Images', -command => [$w,'Images'], -state => ' +disabled')->pack(-side => 'left'); $but->Button(-text => 'Open', -command => [$w,'Open'])->pack(-side => +'left'); $but->Button(-text => 'Print', -command => [$w,'Print'])->pack(-side = +> 'left'); $but->Button(-text => 'Find', -command => [$w,'Find'])->pack(-side => +'left'); $but->Button(-text => 'Stop', -command => [$w,'Stop'])->pack(-side => +'left'); $mw->AddScrollbars($w); my $show = $mw->Frame(-label => 'URL : ',-labelPack => [-side => 'left +'])->pack(-fill => 'x'); $show->Label(-textvariable => \$showlink, -anchor => 'w')->pack(-fill +=> 'y',-anchor => 'w', -expand => 1, -side => 'left'); $show->Frame(-height => '3m', -width => '60m', -borderwidth => 3, -bac +kground => 'cyan', -relief => 'sunken') ->pack(-side => 'right', -padx => '3m'); my %args = (-scrollbars => 'w'); $mw->ConfigDefault(\%args); $mw->configure(%args); $w->url($ARGV[0]) if (@ARGV); $w->focus; MainLoop;

If you were using WxWidgets or Win32::GUI (and assuming you're in Win32 environment), you could use either Wx::ActiveX or Win32::GUI::AxWindow in order to create a Internet Explorer component that does the rendering for you.

Maybe you could write a XS extension exntending Tk. ;)
It shouldn't be a big problem, since Tcl::Tk documentation states that Tcl/Tk already supports creating ActiveX widgets.


acid06
perl -e "print pack('h*', 16369646), scalar reverse $="

In reply to Re^3: Perl/Tk application rendering HTML? by acid06
in thread Perl/Tk application rendering HTML? by jdtoronto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.