Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Tkx checkbutton font (http://www.velocityreviews.com/forums/t911196-tkx-checkbutton-font.html)

kens 08-10-2009 06:36 PM

Tkx checkbutton font
 
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

smallpond 08-11-2009 03:14 PM

Re: Tkx checkbutton font
 
On Aug 10, 2:36*pm, kens <kenslate...@hotmail.com> wrote:
> Hi all,
>


> (my $resetButton = $mw->new_ttk__checkbutton

^^^

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



All times are GMT. The time now is 02:29 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57