How can I change the default font size in tk?

Discussion in 'Ruby' started by Wang Dong, Feb 12, 2007.

  1. Wang Dong

    Wang Dong Guest

    root = TkRoot.new do
    font {Tahoma 10 normal}
    end

    can't work.
    Wang Dong, Feb 12, 2007
    #1
    1. Advertising

  2. Wang Dong

    Wang Dong Guest

    I found TkOptionDB.add( "*font", "{Lucida Sans Unicode} 10" ) works£¬but
    Tk::Tile didn't change.


    "Wang Dong" <> дÈëÏûÏ¢ÐÂÎÅ:eqopt7$umu$99.com...
    > root = TkRoot.new do
    > font {Tahoma 10 normal}
    > end
    >
    > can't work.
    >
    >
    Wang Dong, Feb 12, 2007
    #2
    1. Advertising

  3. Wang Dong

    Wang Dong Guest

    I know how:
    TkFont.configure('TkDefaultFont', 'family' => 'Lucida Sans Unicode', 'size'
    => '10')

    "Wang Dong" <> дÈëÏûÏ¢ÐÂÎÅ:eqoqm6$v4p$99.com...
    >I found TkOptionDB.add( "*font", "{Lucida Sans Unicode} 10" ) works£¬but
    >Tk::Tile didn't change.
    >
    >
    > "Wang Dong" <> дÈëÏûÏ¢ÐÂÎÅ:eqopt7$umu$99.com...
    >> root = TkRoot.new do
    >> font {Tahoma 10 normal}
    >> end
    >>
    >> can't work.
    >>
    >>

    >
    >
    Wang Dong, Feb 12, 2007
    #3
    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. dave richards
    Replies:
    2
    Views:
    600
    Paul Furman
    Feb 19, 2004
  2. Wongod
    Replies:
    2
    Views:
    693
  3. Carl
    Replies:
    2
    Views:
    261
  4. wial
    Replies:
    2
    Views:
    798
  5. mttc
    Replies:
    2
    Views:
    2,363
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page