in reply to Help with Tk_place

Tk::Buttons are Tk::Widgets
use Tk; my $mw = MainWindow->new(); $button1 = $mw->Button(-text => 'one')->place(-x=>'10', -y=>'10'); $button2 = $mw->Button(-text => 'two')->place(-x=>'15', -y=>'15'); $button3 = $mw->Button( -text => 'three', -command => sub { $button3->lower( $button2 ); }, )->place(-x=>'20', -y=>'20'); $mw->MainLoop;

Replies are listed 'Best First'.
Re^2: Help with Tk_place
by Anonymous Monk on Feb 23, 2010 at 00:31 UTC
    If you don't know which widget is below the current widget, is there a magical way to figure out the next lowest widget? Otherwise lower will place the widget at the bottom of the stack (send to back) instead of as in the example which puts the widget below it's current position (send backward).
      Who cares? You can raise the widget you want on top
      hi,

       $widget->children returns the children in stacking order.


      Cheers, Christoph