Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Visual (perl/Tk) regex tweaking utility

by zentara (Archbishop)
on Sep 21, 2011 at 17:34 UTC ( [id://927183]=note: print w/replies, xml ) Need Help??


in reply to Visual (perl/Tk) regex tweaking utility

Very nice. I needed some bigger fonts though, especially for fullscreen use, and I added this to your code. It works well on linux. I just tucked the code in between the new MainWindow and geometry lines.
$w{mw} = MainWindow->new; ################ aded for font control ############3 use Tk::FontDialog; my $fd = $w{mw}->FontDialog(-nicefont => 0, -title => 'Select Font', -applycmd => \&apply_font, -familylabel => 'Schrift~familie', -fixedfontsbutton => 1, -nicefontsbutton => 1, ); my $b = $w{mw}->Button(-text => 'Choose Font', -bg => 'lightyellow', -command => sub { my $font = $fd->Show; apply_font($font); })->pack; sub apply_font { my $font = shift; if (defined $font) { $b->configure(-font => $font); $w{mw}->RefontTree(-font => $font, -canvas => 1); } } ############### end of font control ###################### $w{mw}->geometry('600x480');

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Visual (perl/Tk) regex tweaking utility
by thundergnat (Deacon) on Sep 21, 2011 at 23:59 UTC

    Hey, nice. I haven't used the Tk::FontDialog widget before. Looks like a very useful (and simple) tool.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://927183]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found