Tkx checkbutton font

Discussion in 'Perl Misc' started by kens, Aug 10, 2009.

  1. kens

    kens Guest

    Hi all,

    I have recently started to look at the Tkx module for developing GUI-
    based applications. In the past I have used Tk.

    I am having trouble setting the font on a checkbutton's text. The code
    below does not compile, it gives the error:

    unknown option "-font" at test.pl line 12.

    ---CODE---
    use strict;
    use warnings;
    use Tkx;

    my $font = 'Courier 10 normal';

    my (
    $reset,
    );

    my $mw = Tkx::widget->new('.');
    (my $resetButton = $mw->new_ttk__checkbutton
    (-text => 'Reset',
    -variable => \$reset,
    # The -font option causes error
    -font => $font,
    -onvalue => 1,
    -offvalue => 0,
    ))->g_pack(-side=>'top', -anchor=>'w');
    Tkx::MainLoop();
    --- End CODE ---

    The Tk reference (http://www.tcl.tk/man/tcl8.5/TkCmd/
    checkbutton.htm#M16) indicates the '-font' is a standard option for a
    checkbutton.

    Is this option just not implemented in Perl::Tkx? Or is there a
    different option?

    Thanks,
    Ken Slater
     
    kens, Aug 10, 2009
    #1
    1. Advertising

  2. kens

    smallpond Guest

    On Aug 10, 2:36 pm, kens <> wrote:
    > Hi all,
    >


    > (my $resetButton = $mw->new_ttk__checkbutton

    ^^^

    font is a standard option for a checkbutton, but
    you're not using a checkbutton.
     
    smallpond, Aug 11, 2009
    #2
    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. Askari
    Replies:
    2
    Views:
    411
    Eric Brunel
    Jan 15, 2004
  2. Elaine Jackson

    Tkinter CheckButton variables

    Elaine Jackson, Jul 1, 2004, in forum: Python
    Replies:
    1
    Views:
    440
    klappnase
    Jul 1, 2004
  3. mttc
    Replies:
    2
    Views:
    2,450
    Roedy Green
    Jul 3, 2009
  4. Prathap
    Replies:
    3
    Views:
    289
    smallpond
    Jun 30, 2009
  5. Prathap

    Tree view in tkx module.

    Prathap, Jul 2, 2009, in forum: Perl Misc
    Replies:
    1
    Views:
    176
    J. Gleixner
    Jul 2, 2009
Loading...

Share This Page