Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Tkx checkbutton font

 
 
kens
Guest
Posts: n/a
 
      08-10-2009
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
 
Reply With Quote
 
 
 
 
smallpond
Guest
Posts: n/a
 
      08-11-2009
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
 
 
 
Reply

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



Advertisments