Method: TkHTML_File_Viewer#load_file

Defined in:
sample/tkextlib/tkHTML/ss.rb

#load_file(name) ⇒ Object

Load a file into the HTML widget



306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'sample/tkextlib/tkHTML/ss.rb', line 306

def load_file(name)
  return unless (doc = read_file(name))
  clear_screen()
  @last_file = name
  if @html_fs && @html_fs.exist?
    w = @html_fs
  else
    w = @html
  end
  w.configure(:base=>name)
  w.parse(doc)
  w.configure(:cursor=>'top_left_arrow')
  @old_imgs.clear
end