in reply to Re: Loop Widgets in Container
in thread Loop Widgets in Container

It does not operate as expected. My code:
my $FG_FrameInit = $PageFG -> LabFrame( -label=>"In +itialize Device", -labelside=>"acrosstop", -borderwidth=>1, -relief=>"raised"); my $entry_FGDeviceAddress = $FG_FrameInit -> LabEntry( -lab +el=>"Address:", -background=>"white", -width=>15, -text=>"ASRL7::INSTR", -labelPack=>[-side=>"left"]); $balloon->attach($entry_FGDeviceAddress, -balloonmsg => "Device Addres +s"); my $btn_FGInitDevice = $FG_FrameInit -> Button( -text=> +"Init", -command=>\&InitFG); my @a = $FG_FrameInit->children(); print "$_," for(@a);
Output:
Tk::Frame=HASH(0x2228e0c),Tk::Label=HASH(0x221f384),
What am I doing wrong?

Replies are listed 'Best First'.
Re^3: Loop Widgets in Container
by choroba (Cardinal) on Apr 27, 2010 at 19:38 UTC
    You do not use a Frame, but a LabFrame, which is a Label + a Frame.
      I gave the Frame as example. How can I get the children of some container (frame, labframe, toplevel...)
        You got the children of the LabFrame. Use Data::Dumper if you cannot find its child's children.