Although I have used Perl Tk for a number of years I never have wanted to do this before.
I want to alter both the size of the tick box in a Checkbutton and the size of the round button of a Radio button.
I could not see any obvious option for this so I thought it may be affected my the text size on the widget.
The Perl below creates 2 Checkbuttons with different sizes of text. However the tick boxes are the same size.
Is there a way of altering the tick box size? I could want differenmt sizes on various widgets.
use Tk; use strict; my $mw = MainWindow->new(-title => 'CheckBox size'); my $f = $mw->Frame->pack(-side => 'top'); my $weight = "normal"; my $fch = $f->Checkbutton( -text => "Weight", -variable => \$weight, )->pack(-side => 'left'); my $size = 16; $fch->configure(-font => [ -size => $size ]); my $fch2 = $f->Checkbutton( -text => "Weight", -variable => \$weight, )->pack(-side => 'left'); $size = 32; $fch2->configure(-font => [ -size => $size ]); MainLoop;

In reply to Tk - Tick box size change by merrymonk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.