in reply to Perl/Tk widget coordinates, simple question

I haven't used it myself, but you might investigate the Tk  place geometry manager, in particular its  -in -x -y -relx -rely -anchor options. The caveat is that you may need to use  place as the geo. manager for the entire application to avoid the possibility of duelling managers.

Replies are listed 'Best First'.
Re^2: Perl/Tk widget coordinates, simple question
by warpod (Novice) on Jan 05, 2010 at 18:01 UTC
    I think I found out the way using "geometry" method (I'm new to Tk, so did not find this method in first place)

    replacing comment line with this:
    my @wg = ($w->geometry =~ /\+(\d+)\+(\d+)/); my @bg = ($button->geometry =~ /\+(\d+)\+(\d+)/); $wg[$_] += $bg[$_] for (0..@wg-1); $mw->geometry("+$wg[0]+$wg[1]");
    has solved my problem