TkHTML progress, additional questions

Discussion in 'Ruby' started by Randy Kramer, Apr 3, 2006.

  1. Randy Kramer

    Randy Kramer Guest

    Progress:

    I finally made some progress setting up TkHTML and getting it to run both as a
    Ruby script and within irb. (The most basic thing I have to do is start irb
    (or Ruby) with prefixes like:

    LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH /usr/local/bin/irb
    (or ruby)

    Somebody had told me that before, but it didn't seem to work before (I just
    did a reinstall, so maybe that is the difference). (And, unfortunately, I'll
    have to do another reinstall in the "near" future (maybe not for a few weeks)
    because once again, readline did not get compiled in (but that was because I
    had renamed readline.h a week or so ago to do some experimentation and forgot
    to rename it back.)

    Minor point (for me) to remember--some of the examples I tried did not include
    the Tk.mainloop statement--worked much better after I added that ;-)

    Questions:

    1. Fonts: The fonts don't look too good--I presume that when I learn more
    about TkHTML, I'll find a way to change the fonts, maybe not by the user, but
    hopefully within Ruby? (I'm hoping not to have to fool around in C, C++, tcl
    or whatever to change fonts.)

    2. Background: When I run either hv.rb or ss.rb, I get a nice white
    background (i.e., this is what I want). When I run (this) sample program
    within irb:

    require 'tk'
    require 'tkextlib/tkHTML'
    doc = "<body bgcolor=\"#FFFFFF\"><FONT SIZE=\"3\" COLOR=\"#000000\"
    FACE=\"Courier,serif\"><b>It is</b> worth</FONT></body>"
    hv = Tk::HTML_Widget.new.pack
    hv.parse(doc)
    Tk.mainloop

    I get a gray background, which I don't want. I presume I'll find a way to
    change this to white as well, hopefully within ruby (or maybe my HTML is
    totally wrong (which wouldn't surprise me))?

    3. Full Screen mode:

    When I run ss.rb and switch to full screen mode on my dual head machine, the
    widget expands to fully cover both "heads".

    Furthermore, I can't find a way to get of full screen mode except by switching
    to a VT, then finding and killing the process. (I've tried <alt>f,f and
    some other things I could think of.) Is there another way?

    Note: These points about full screen mode are probably not a big issue--I'll
    probably just disable full screen mode on the ss.rb menu (if I use anything
    like ss.rb).

    Randy Kramer
     
    Randy Kramer, Apr 3, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Gollob
    Replies:
    0
    Views:
    2,090
    Matt Gollob
    Nov 18, 2003
  2. Mark
    Replies:
    2
    Views:
    682
    Steven Cheng[MSFT]
    Jan 28, 2004
  3. Charlie Zhang
    Replies:
    3
    Views:
    1,341
    Paul Lutus
    Aug 16, 2004
  4. Randy Kramer
    Replies:
    11
    Views:
    305
    Randy Kramer
    Mar 27, 2006
  5. Novice

    Additional logging questions

    Novice, Feb 27, 2012, in forum: Java
    Replies:
    17
    Views:
    401
    Arved Sandstrom
    Feb 29, 2012
Loading...

Share This Page