Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

(ichi) Re: Regex tutor in Perl/Tk

by ichimunki (Priest)
on Jul 01, 2002 at 15:40 UTC ( #178584=note: print w/replies, xml ) Need Help??

in reply to Regex tutor in Perl/Tk

Just a suggestion (not a criticism!), when you have a lot of Tk widgets that share properties, like you do here with font, justify, offvalues, etc, you might consider simply making an array of those properties and stuffing that into the property list for each widget instead.
my @props = ( '-color' => COLOR, '-justify' => 'left', '-etc' => 'etc' ); my $button = $root->Button( -text => 'Sample', @props )->pack();
This keeps your code more concise and makes the differences between the widgets easier to see.

Replies are listed 'Best First'.
Re: (ichi) Re: Regex tutor in Perl/Tk
by Popcorn Dave (Abbot) on Jul 01, 2002 at 16:16 UTC
    Thanks for that!

    Every time I think I know Perl... : )

    Some people fall from grace. I prefer a running start...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://178584]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2016-12-08 08:48 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (136 votes). Check out past polls.