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 line 12.

    use strict;
    use warnings;
    use Tkx;

    my $font = 'Courier 10 normal';

    my (

    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');
    --- End CODE ---

    The Tk reference (
    checkbutton.htm#M16) indicates the '-font' is a standard option for a

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

    Ken Slater
    kens, Aug 10, 2009
    1. Advertisements

  2. kens

    smallpond Guest


    font is a standard option for a checkbutton, but
    you're not using a checkbutton.
    smallpond, Aug 11, 2009
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.