Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main > by-pkgid > e2a5fef11a7f55d2dc803b8b7498c8e5 > files > 688

ruby-tcltk-1.8.5-31.el5_9.x86_64.rpm

#!/usr/bin/env ruby
require 'tk'
require 'tkextlib/iwidgets'

TkOption.add('*textBackground', 'white')

sh = Tk::Iwidgets::Scrolledhtml.new(:fontname=>'helvetica', 
                                    :linkcommand=>proc{|href|
                                      sh.import_link(href)
                                    })
sh.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)

sh.import(Tk.getOpenFile(:title=>'select HTML document'))

Tk.mainloop