Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

(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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2018-05-27 06:10 GMT
Find Nodes?
    Voting Booth?