in reply to Loop Widgets in Container

Use $Frame->children.

Replies are listed 'Best First'.
Re^2: Loop Widgets in Container
by Bintuch (Acolyte) on Apr 27, 2010 at 19:31 UTC
    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?
      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...)