Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Visual (perl/Tk) regex tweaking utility

by zentara (Archbishop)
on Sep 21, 2011 at 17:34 UTC ( #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


Comment on Re: Visual (perl/Tk) regex tweaking utility
Download Code
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
Node Status?
node history
Node Type: note [id://927183]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-28 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls