Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Tkx checkbutton font

Thread Tools

Tkx checkbutton font

Posts: n/a
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
Reply With Quote
Posts: n/a
On Aug 10, 2:36*pm, kens <(E-Mail Removed)> wrote:
> Hi all,

> (my $resetButton = $mw->new_ttk__checkbutton


font is a standard option for a checkbutton, but
you're not using a checkbutton.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
Tree view in tkx module. Prathap Perl Misc 1 07-02-2009 08:24 PM
Unable to configure background in perl-Tkx. Prathap Perl Misc 3 06-30-2009 09:12 PM
Tkinter CheckButton variables Elaine Jackson Python 1 07-01-2004 09:38 AM
CheckButton -- modify "check state" Askari Python 2 01-15-2004 08:50 AM