Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Tkx: return list of slaves

by v4169sgr (Sexton)
on Sep 18, 2009 at 14:16 UTC ( [id://796120]=perlquestion: print w/replies, xml ) Need Help??

v4169sgr has asked for the wisdom of the Perl Monks concerning the following question:

I am using ActiveState's Perl on windows, using Tkx.

What I would like to do is return a list of slaves to a widget e.g. a frame, and loop over them to add padding. Saves typing ;-)

But the following code snippet does not compile for me:

my @kids = $session_frame->g_packSlaves(); foreach (@kids) { $_->g_pack(-padx => 5, -pady => 5); }

What am I doing wrong?

Thanks!

Replies are listed 'Best First'.
Re: Tkx: return list of slaves
by Anonymous Monk on Sep 18, 2009 at 15:18 UTC
    You need to repack ( pack forget, then pack)

      Thanks for your reply, but I was wondering how to do this in Tkx:

      sub repack_kids { my @kids = $mw->packSlaves; foreach (@kids) { %packinfo = $_->packInfo(); $_->pack(-padx => 20 + $packinfo{"-padx"}, -pady => 20 + $packinfo{"-pady"}); } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found